From b4ed4d1bc8520b41ec7d36601bf6e32cf42a032c Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Thu, 14 Sep 2006 06:08:53 +0000 Subject: [PATCH] Bug 230219 navigator button preferences only work if a navigator window is open r=dean_tessman sr=alecf a=chofmann git-svn-id: svn://10.0.0.236/trunk@211437 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/suite/browser/navigator.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mozilla/suite/browser/navigator.js b/mozilla/suite/browser/navigator.js index 445d78bfc11..a225d1a419c 100644 --- a/mozilla/suite/browser/navigator.js +++ b/mozilla/suite/browser/navigator.js @@ -74,6 +74,12 @@ var gFocusedDocument = null; const gButtonPrefListener = { domain: "browser.toolbars.showbutton", + init: function() + { + var array = pref.getChildList(this.domain, {}); + for (var i in array) + this.observe(pref, "nsPref:changed", array[i]); + }, observe: function(subject, topic, prefName) { // verify that we're changing a button pref @@ -460,6 +466,9 @@ function Startup() // Do all UI building here: + // Ensure button visibility matches prefs + gButtonPrefListener.init(); + // set home button tooltip text updateHomeButtonTooltip();