fix for bug #343054, js errors when changing certain browser.tabs.* prefs

This commit is contained in:
sspitzer@mozilla.org 2007-08-21 22:01:26 -07:00
parent 9bb4523ed7
commit e6416fb86c
2 changed files with 5 additions and 5 deletions

View File

@ -2388,7 +2388,7 @@
<xul:hbox class="tabs-closebutton-box" align="center" pack="end" anonid="tabstrip-closebutton">
<xul:toolbarbutton ondblclick="event.stopPropagation();"
class="close-button tabs-closebutton"
oncommand="this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.removeCurrentTab()"/>
oncommand="this.parentNode.parentNode.parentNode.parentNode.parentNode.removeCurrentTab()"/>
</xul:hbox>
</content>
<implementation>
@ -2449,14 +2449,14 @@
if (topic == "nsPref:changed") {
switch (data) {
case "browser.tabs.disableBackgroundClose":
this._updateDisableBackgroundClose();
this.tabbox._updateDisableBackgroundClose();
break;
case "browser.tabs.closeButtons":
var pb2 =
Components.classes['@mozilla.org/preferences-service;1'].
getService(Components.interfaces.nsIPrefBranch2);
this.mCloseButtons = pb2.getIntPref("browser.tabs.closeButtons");
this.adjustTabstrip(false);
this.tabbox.mCloseButtons = pb2.getIntPref("browser.tabs.closeButtons");
this.tabbox.adjustTabstrip(false);
break;
}
}

View File

@ -65,7 +65,7 @@
<xul:hbox class="tabs-closebutton-box" align="center" pack="end" anonid="tabstrip-closebutton">
<xul:toolbarbutton ondblclick="event.stopPropagation();"
class="close-button tabs-closebutton"
oncommand="this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.removeCurrentTab()"/>
oncommand="this.parentNode.parentNode.parentNode.parentNode.parentNode.removeCurrentTab()"/>
</xul:hbox>
</xul:hbox>
<xul:spacer class="tabs-bottom-spacer"/>