Bug 351965: Disable background close looks evil in the new themes, patch by Phil Ringnalda <philringnalda@gmail.com>, r=mano

This commit is contained in:
gavin@gavinsharp.com 2007-08-21 22:02:08 -07:00
Родитель be996bcd19
Коммит 9e10bb4363
2 изменённых файлов: 0 добавлений и 27 удалений

Просмотреть файл

@ -2548,11 +2548,8 @@
} }
this.firstChild.minWidth = this.mTabMinWidth; this.firstChild.minWidth = this.mTabMinWidth;
this._updateDisableBackgroundClose();
this.adjustTabstrip(); this.adjustTabstrip();
pb2.addObserver("browser.tabs.disableBackgroundClose",
this._prefObserver, true);
pb2.addObserver("browser.tabs.closeButtons", pb2.addObserver("browser.tabs.closeButtons",
this._prefObserver, true); this._prefObserver, true);
@ -2602,23 +2599,6 @@
document.getAnonymousElementByAttribute(this, "anonid", "tabstrip-closebutton"); document.getAnonymousElementByAttribute(this, "anonid", "tabstrip-closebutton");
</field> </field>
<method name="_updateDisableBackgroundClose">
<body><![CDATA[
var prefs =
Components.classes['@mozilla.org/preferences-service;1'].
getService(Components.interfaces.nsIPrefBranch);
try {
if (prefs.getBoolPref("browser.tabs.disableBackgroundClose"))
this.setAttribute("disablebackgroundclose", "true");
else
this.removeAttribute("disablebackgroundclose");
}
catch (e) {
this.setAttribute("disablebackgroundclose", "true");
}
]]></body>
</method>
<field name="_prefObserver">({ <field name="_prefObserver">({
tabbox: this, tabbox: this,
@ -2626,9 +2606,6 @@
{ {
if (topic == "nsPref:changed") { if (topic == "nsPref:changed") {
switch (data) { switch (data) {
case "browser.tabs.disableBackgroundClose":
this.tabbox._updateDisableBackgroundClose();
break;
case "browser.tabs.closeButtons": case "browser.tabs.closeButtons":
var pb2 = var pb2 =
Components.classes['@mozilla.org/preferences-service;1']. Components.classes['@mozilla.org/preferences-service;1'].
@ -3013,7 +2990,6 @@
<xul:image class="tab-icon" xbl:inherits="validate,src=image"/> <xul:image class="tab-icon" xbl:inherits="validate,src=image"/>
<xul:label class="tab-text" xbl:inherits="value=label,accesskey,crop,disabled" flex="1"/> <xul:label class="tab-text" xbl:inherits="value=label,accesskey,crop,disabled" flex="1"/>
</xul:hbox> </xul:hbox>
<xul:image anonid="close-button-placeholder" class="tab-close-button-placeholder"/>
<xul:toolbarbutton anonid="close-button" tabindex="-1" class="tab-close-button"/> <xul:toolbarbutton anonid="close-button" tabindex="-1" class="tab-close-button"/>
</content> </content>

Просмотреть файл

@ -16,9 +16,6 @@
<content chromedir="&locale.dir;" <content chromedir="&locale.dir;"
closetabtext="&closeTab.label;"> closetabtext="&closeTab.label;">
<xul:hbox class="tab-image-left" xbl:inherits="selected"/> <xul:hbox class="tab-image-left" xbl:inherits="selected"/>
<xul:hbox pack="center" align="center">
<xul:image anonid="close-button-placeholder" class="tab-close-button-placeholder"/>
</xul:hbox>
<xul:toolbarbutton anonid="close-button" class="tab-close-button" tabindex="-1"/> <xul:toolbarbutton anonid="close-button" class="tab-close-button" tabindex="-1"/>
<xul:hbox flex="1" class="tab-image-middle" align="center" xbl:inherits="selected"> <xul:hbox flex="1" class="tab-image-middle" align="center" xbl:inherits="selected">
<xul:stack class="tab-icon"> <xul:stack class="tab-icon">