From a431551eede2411bef52ca1c8a12b27e6b559bca Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Fri, 29 Nov 2013 01:22:18 +0900 Subject: [PATCH] Remove codes for "tabs in titlebar" #611 --- defaults/preferences/treestyletab.js | 4 ---- modules/constants.js | 1 - modules/window.js | 22 +--------------------- skin/classic/treestyletab/WINNT-base.css | 12 ------------ 4 files changed, 1 insertion(+), 38 deletions(-) diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 656857fa..3f76202a 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -94,10 +94,6 @@ pref("extensions.treestyletab.platform.Linux.tabbar.style", "plain"); * Aero Glass will be applied for the vertical tab bar, if you set this to "true". */ pref("extensions.treestyletab.tabbar.style.aero", false); -/** - * Allow/disallow to show toolbox in the titlebar, for Australis. - */ -pref("extensions.treestyletab.toolbox.allowShowInTitlebar", true); /** * AutoHide style for the vertical tab bar. diff --git a/modules/constants.js b/modules/constants.js index 7adee602..77208845 100644 --- a/modules/constants.js +++ b/modules/constants.js @@ -59,7 +59,6 @@ const TreeStyleTabConstants = Object.freeze({ kCOLLAPSING_PHASE_TO_BE_COLLAPSED : 'collapse', kCOLLAPSING_PHASE_TO_BE_EXPANDED : 'expand', kALLOW_COLLAPSE : 'treestyletab-allow-subtree-collapse', - kALLOW_TOOLBOX_IN_TITLEBAR : 'treestyletab-allow-toolbox-in-titlebar', kALLOW_STACK : 'treestyletab-stack-collapsed-tabs', kREMOVED : 'treestyletab-removed', diff --git a/modules/window.js b/modules/window.js index 326a7472..4eeab639 100644 --- a/modules/window.js +++ b/modules/window.js @@ -387,14 +387,12 @@ TreeStyleTabWindow.prototype = { this.processRestoredTabs(); this.updateTabsOnTop(); - this.updateTabsInTitlebarForMenubar(); // Init autohide service only if it have to be activated. if (this.isAutoHide) this.onPrefChange('extensions.treestyletab.tabbar.autoHide.mode'); this.onPrefChange('extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.whileFocusMovingByShortcut'); - this.onPrefChange('extensions.treestyletab.toolbox.allowShowInTitlebar'); this.initialized = true; }, @@ -452,16 +450,6 @@ TreeStyleTabWindow.prototype = { }, this); }, - updateTabsInTitlebarForMenubar : function TSTWindow_updateTabsInTitlebarForMenubar() - { - if (!this.window.TabsInTitlebar) - return; - - var menubar = this.document.querySelector('#toolbar-menubar'); - var menubarHidden = menubar && menubar.getAttribute('autohide') == 'true'; - this.window.TabsInTitlebar.allowedBy('TreeStyleTab-menubar', menubarHidden); - }, - initUIShowHideObserver : function TSTWindow_initUIShowHideObserver() { this.rootElementObserver = new BrowserUIShowHideObserver(this, this.document.documentElement); @@ -1052,11 +1040,7 @@ TreeStyleTabWindow.prototype = { } } if (TabsInTitlebar) { - let allowed = false; - if (isTopTabbar) - allowed = this.browser.treeStyleTab.fixed; - else - allowed = utils.getTreePref('toolbox.allowShowInTitlebar'); + let allowed = isTopTabbar && this.browser.treeStyleTab.fixed; TabsInTitlebar.allowedBy('TreeStyleTab-tabsOnTop', allowed); } } @@ -1703,10 +1687,6 @@ TreeStyleTabWindow.prototype = { this.themeManager.set(prefs.getPref('extensions.treestyletab.tabbar.style'), this.position); break; - case 'extensions.treestyletab.toolbox.allowShowInTitlebar': - this.setTabbrowserAttribute(this.kALLOW_TOOLBOX_IN_TITLEBAR, value); - break; - case 'browser.ctrlTab.previews': this.autoHideWindow.updateKeyListeners(this.window); case 'extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.whileFocusMovingByShortcut': diff --git a/skin/classic/treestyletab/WINNT-base.css b/skin/classic/treestyletab/WINNT-base.css index a635ae21..9788afee 100644 --- a/skin/classic/treestyletab/WINNT-base.css +++ b/skin/classic/treestyletab/WINNT-base.css @@ -26,18 +26,6 @@ -moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag"); } -/* show in titlebar mode */ -#main-window[sizemode="normal"][tabsintitlebar="true"][treestyletab-allow-toolbox-in-titlebar="true"]:not([treestyletab-tabbar-position="top"]) - #browser-panel - > #navigator-toolbox - > #nav-bar:not(:-moz-lwtheme), -#main-window[sizemode="normal"][tabsintitlebar="true"][treestyletab-allow-toolbox-in-titlebar="true"]:not([treestyletab-tabbar-position="top"]) - #browser-panel - > #navigator-toolbox - > #nav-bar:not(:-moz-lwtheme):-moz-window-inactive { - margin-top: 1.5em; -} - }