Use meaningful name for "tabs in titlebar" hack
This commit is contained in:
parent
49dd724d0d
commit
d534c28a6d
@ -6906,8 +6906,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
|
|||||||
isPopupShown : function TSTBrowser_isPopupShown(...aArgs) {
|
isPopupShown : function TSTBrowser_isPopupShown(...aArgs) {
|
||||||
return this._callWindowServiceMethod('isPopupShown', aArgs);
|
return this._callWindowServiceMethod('isPopupShown', aArgs);
|
||||||
},
|
},
|
||||||
updateTabsOnTop : function TSTBrowser_updateTabsOnTop(...aArgs) {
|
updateTabsInTitlebar : function TSTBrowser_updateTabsInTitlebar(...aArgs) {
|
||||||
return this._callWindowServiceMethod('updateTabsOnTop', aArgs);
|
return this._callWindowServiceMethod('updateTabsInTitlebar', aArgs);
|
||||||
},
|
},
|
||||||
registerTabFocusAllowance : function TSTBrowser_registerTabFocusAllowance(...aArgs) {
|
registerTabFocusAllowance : function TSTBrowser_registerTabFocusAllowance(...aArgs) {
|
||||||
return this._callWindowServiceMethod('registerTabFocusAllowance', aArgs);
|
return this._callWindowServiceMethod('registerTabFocusAllowance', aArgs);
|
||||||
|
@ -438,7 +438,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
|
|||||||
w.TreeStyleTabWindowHelper.onAfterBrowserInit();
|
w.TreeStyleTabWindowHelper.onAfterBrowserInit();
|
||||||
|
|
||||||
this.processRestoredTabs();
|
this.processRestoredTabs();
|
||||||
this.updateTabsOnTop();
|
this.updateTabsInTitlebar();
|
||||||
|
|
||||||
this.autoHideWindow; // initialize
|
this.autoHideWindow; // initialize
|
||||||
|
|
||||||
@ -632,7 +632,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
|
|||||||
|
|
||||||
case this.kEVENT_TYPE_TABBAR_POSITION_CHANGED:
|
case this.kEVENT_TYPE_TABBAR_POSITION_CHANGED:
|
||||||
case this.kEVENT_TYPE_TABBAR_STATE_CHANGED:
|
case this.kEVENT_TYPE_TABBAR_STATE_CHANGED:
|
||||||
return this.updateTabsOnTop();
|
return this.updateTabsInTitlebar();
|
||||||
|
|
||||||
case this.kEVENT_TYPE_FOCUS_NEXT_TAB:
|
case this.kEVENT_TYPE_FOCUS_NEXT_TAB:
|
||||||
return this.onFocusNextTab(aEvent);
|
return this.onFocusNextTab(aEvent);
|
||||||
@ -1110,20 +1110,20 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
|
|||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateTabsOnTop : function TSTWindow_updateTabsOnTop()
|
updateTabsInTitlebar : function TSTWindow_updateTabsInTitlebar()
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
this.isPopupWindow ||
|
this.isPopupWindow ||
|
||||||
this.tabsOnTopChangingByTST
|
this.tabsInTitlebarChanging
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.tabsOnTopChangingByTST = true;
|
this.tabsInTitlebarChanging = true;
|
||||||
// We have to do this with delay, because the tab bar is always on top
|
// We have to do this with delay, because the tab bar is always on top
|
||||||
// for the toolbar customizing and returned to left or right after a delay.
|
// for the toolbar customizing and returned to left or right after a delay.
|
||||||
setTimeout(this.updateTabsOnTopInternal.bind(this), 0);
|
setTimeout(this.updateTabsInTitlebarInternal.bind(this), 0);
|
||||||
},
|
},
|
||||||
updateTabsOnTopInternal : function TSTWindow_updateTabsOnTopInternal()
|
updateTabsInTitlebarInternal : function TSTWindow_updateTabsInTitlebarInternal()
|
||||||
{
|
{
|
||||||
var TabsInTitlebar = this.window.TabsInTitlebar;
|
var TabsInTitlebar = this.window.TabsInTitlebar;
|
||||||
var isTopTabbar = this.browser.treeStyleTab.position == 'top';
|
var isTopTabbar = this.browser.treeStyleTab.position == 'top';
|
||||||
@ -1137,11 +1137,11 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
|
|||||||
('classicthemerestorerjs' in this.window && utils.getTreePref('compatibility.ClassicThemeRestorer'))
|
('classicthemerestorerjs' in this.window && utils.getTreePref('compatibility.ClassicThemeRestorer'))
|
||||||
)
|
)
|
||||||
allowed = true;
|
allowed = true;
|
||||||
TabsInTitlebar.allowedBy('TreeStyleTab-tabsOnTop', allowed);
|
TabsInTitlebar.allowedBy('TreeStyleTab-tabsInTitlebar', allowed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
this.tabsOnTopChangingByTST = false;
|
this.tabsInTitlebarChanging = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user