Bug 1429385 - Rename adjustTabstrip to _updateCloseButtons (following M-C bug 1415235). r=jorgk
Port of bug 1415235 --HG-- extra : rebase_source : 3657ce87f4309f0d9512dbf3701fab202ca9b05f
This commit is contained in:
Родитель
0fb99b24f9
Коммит
a25cd01029
|
@ -699,7 +699,7 @@
|
|||
} else if (!this._windowIsClosing) {
|
||||
// see notes in addTab
|
||||
let _delayedUpdate = function (aTabContainer) {
|
||||
aTabContainer.adjustTabstrip();
|
||||
aTabContainer._updateCloseButtons();
|
||||
aTabContainer.mTabstrip._updateScrollButtonsDisabledState();
|
||||
};
|
||||
setTimeout(_delayedUpdate, 0, this.tabContainer);
|
||||
|
@ -1754,7 +1754,7 @@
|
|||
case "browser.tabs.closeButtons":
|
||||
subject.QueryInterface(Components.interfaces.nsIPrefBranch);
|
||||
this.tabbox.mCloseButtons = subject.getIntPref("browser.tabs.closeButtons");
|
||||
this.tabbox.adjustTabstrip();
|
||||
this.tabbox._updateCloseButtons();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1806,7 +1806,7 @@
|
|||
|
||||
// |setTimeout| here to ensure we're post reflow
|
||||
var _delayedUpdate = function(aTabContainer) {
|
||||
aTabContainer.adjustTabstrip();
|
||||
aTabContainer._updateCloseButtons();
|
||||
|
||||
if (aTabContainer.selectedItem != tab)
|
||||
aTabContainer._notifyBackgroundTab(tab);
|
||||
|
@ -1831,7 +1831,7 @@
|
|||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="adjustTabstrip">
|
||||
<method name="_updateCloseButtons">
|
||||
<body><![CDATA[
|
||||
// modes for tabstrip
|
||||
// 0 - activetab = close button on active tab only
|
||||
|
@ -1895,7 +1895,7 @@
|
|||
case "resize":
|
||||
var width = this.mTabstrip.boxObject.width;
|
||||
if (width != this.mTabstripWidth) {
|
||||
this.adjustTabstrip();
|
||||
this._updateCloseButtons();
|
||||
this._fillTrailingGap();
|
||||
this._handleTabSelect();
|
||||
this.mTabstripWidth = width;
|
||||
|
|
|
@ -519,7 +519,7 @@
|
|||
this.tabContainer.appendChild(t);
|
||||
if (this.tabContainer.mCollapseToolbar.collapsed) {
|
||||
this.tabContainer.mCollapseToolbar.collapsed = false;
|
||||
this.tabContainer.adjustTabstrip();
|
||||
this.tabContainer._updateCloseButtons();
|
||||
}
|
||||
|
||||
let oldTab = this._mostRecentTabInfo = this.currentTabInfo;
|
||||
|
@ -1749,7 +1749,7 @@
|
|||
|
||||
this.firstChild.minWidth = this.mTabMinWidth;
|
||||
this.firstChild.maxWidth = this.mTabMaxWidth;
|
||||
this.adjustTabstrip();
|
||||
this._updateCloseButtons();
|
||||
|
||||
Services.prefs.addObserver("mail.tabs.", this._prefObserver);
|
||||
|
||||
|
@ -1818,7 +1818,7 @@
|
|||
switch (data) {
|
||||
case "mail.tabs.closeButtons":
|
||||
this.tabbox.mCloseButtons = subject.getIntPref("mail.tabs.closeButtons");
|
||||
this.tabbox.adjustTabstrip();
|
||||
this.tabbox._updateCloseButtons();
|
||||
break;
|
||||
case "mail.tabs.autoHide":
|
||||
this.tabbox.mAutoHide = subject.getBoolPref("mail.tabs.autoHide");
|
||||
|
@ -1863,7 +1863,7 @@
|
|||
]]></setter>
|
||||
</property>
|
||||
|
||||
<method name="adjustTabstrip">
|
||||
<method name="_updateCloseButtons">
|
||||
<body><![CDATA[
|
||||
// modes for tabstrip
|
||||
// 0 - activetab = close button on active tab only
|
||||
|
@ -1911,7 +1911,7 @@
|
|||
case "resize":
|
||||
var width = this.mTabstrip.boxObject.width;
|
||||
if (width != this.mTabstripWidth) {
|
||||
this.adjustTabstrip();
|
||||
this._updateCloseButtons();
|
||||
// XXX without this line the tab bar won't budge
|
||||
this.mTabstrip.scrollByPixels(1);
|
||||
this._handleTabSelect();
|
||||
|
|
|
@ -416,7 +416,7 @@
|
|||
if (!this.mStripVisible)
|
||||
{
|
||||
this.mStripVisible = true;
|
||||
this.tabContainer.adjustTabstrip();
|
||||
this.tabContainer._updateCloseButtons();
|
||||
}
|
||||
|
||||
let oldPanel = this.panelContainer.selectedPanel;
|
||||
|
@ -1051,7 +1051,7 @@
|
|||
this.mCloseButtons = this.mPrefs.getIntPref ("browser.tabs.closeButtons");
|
||||
this.firstChild.minWidth = this.mTabMinWidth;
|
||||
this.firstChild.maxWidth = this.mTabMaxWidth;
|
||||
this.adjustTabstrip();
|
||||
this._updateCloseButtons();
|
||||
this.mPrefs.addObserver("browser.tabs.", this);
|
||||
window.addEventListener("resize", this);
|
||||
|
||||
|
@ -1099,7 +1099,7 @@
|
|||
<field name="mTabMaxWidth">250</field>
|
||||
<field name="mTabClipWidth">140</field>
|
||||
<field name="mCloseButtons">3</field>
|
||||
<method name="adjustTabstrip">
|
||||
<method name="_updateCloseButtons">
|
||||
<body>
|
||||
<![CDATA[
|
||||
// modes for tabstrip
|
||||
|
@ -1159,7 +1159,7 @@
|
|||
let width = this.mTabstrip.boxObject.width;
|
||||
if (width != this.mTabstripWidth)
|
||||
{
|
||||
this.adjustTabstrip();
|
||||
this._updateCloseButtons();
|
||||
// XXX without this line the tab bar won't budge
|
||||
this.mTabstrip.scrollByPixels(1);
|
||||
this._handleTabSelect();
|
||||
|
@ -1279,7 +1279,7 @@
|
|||
if (aTopic == "nsPref:changed" && aData == kCloseButtons)
|
||||
{
|
||||
this.mCloseButtons = this.mPrefs.getIntPref(kCloseButtons);
|
||||
this.adjustTabstrip();
|
||||
this._updateCloseButtons();
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче