From 44154fc1ed69e01ba582b72c95b1a1761267c818 Mon Sep 17 00:00:00 2001 From: piro Date: Thu, 16 Sep 2010 04:19:17 +0000 Subject: [PATCH] =?UTF-8?q?Minefield=E3=81=A7=E3=81=AF=E3=82=BF=E3=83=96?= =?UTF-8?q?=E3=81=AE=E4=B8=80=E8=A6=A7=E8=A1=A8=E7=A4=BA=E7=94=A8=E3=83=9C?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=83=BB=E9=9D=9E?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=AE=E5=88=B6=E5=BE=A1=E3=81=AF=E3=83=84?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=90=E3=83=BC=E3=82=AB=E3=82=B9=E3=82=BF?= =?UTF-8?q?=E3=83=9E=E3=82=A4=E3=82=BA=E3=81=A7=E8=87=AA=E7=94=B1=E3=81=AB?= =?UTF-8?q?=E8=A1=8C=E3=81=88=E3=82=8B=E3=81=9F=E3=82=81=E3=80=81=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E9=A0=85=E7=9B=AE=E3=81=A8=E3=81=97=E3=81=A6=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=97=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7236 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/config.js | 8 ++++++ content/treestyletab/config.xul | 2 +- content/treestyletab/treestyletab.css | 8 +++--- content/treestyletab/treestyletabbrowser.js | 28 +++++++++++++-------- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/content/treestyletab/config.js b/content/treestyletab/config.js index 0292d79f..ab8ead45 100644 --- a/content/treestyletab/config.js +++ b/content/treestyletab/config.js @@ -72,6 +72,14 @@ function initAppearancePane() sidebar.setAttribute('disabled', true); } + var hideAllTabsButton = document.getElementById('hideAlltabsButton-box'); + if (comparator.compare(XULAppInfo.version, '4.0b3') > 0) { + hideAllTabsButton.setAttribute('hidden', true); + } + else { + hideAllTabsButton.removeAttribute('hidden'); + } + var boxes = [ document.getElementById('extensions.treestyletab.tabbar.style-arrowscrollbox'), document.getElementById('extensions.treestyletab.twisty.style-arrowscrollbox') diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul index d0663084..ffccb32f 100644 --- a/content/treestyletab/config.xul +++ b/content/treestyletab/config.xul @@ -132,7 +132,7 @@ preference="extensions.treestyletab.enableSubtreeIndent.vertical" label="&config.enableSubtreeIndent;"/> - + .close-button.tabs-closebutton { +#TabsToolbar[treestyletab-mode="vertical"] > toolbarbutton, +#TabsToolbar[treestyletab-mode="vertical"] > toolbarpaletteitem > toolbarbutton { max-width: none !important; } @@ -273,9 +273,7 @@ tabbrowser[treestyletab-tabbar-autohide-mode="1"][treestyletab-tabbar-autohide=" .tabbrowser-tabs[treestyletab-hide-alltabs-button="true"] .tabs-alltabs-stack, .tabbrowser-tabs[treestyletab-hide-alltabs-button="true"] - .tabbrowser-arrowscrollbox ~ stack, /* "all tabs" button in Firefox 3.0-3.5 */ -#TabsToolbar[treestyletab-hide-alltabs-button="true"] - .tabs-alltabs-button { + .tabbrowser-arrowscrollbox ~ stack /* "all tabs" button in Firefox 3.0-3.5 */ { visibility: collapse !important; } diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 54d46e75..b5078cb9 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1242,7 +1242,9 @@ TreeStyleTabBrowser.prototype = { this.setTabbrowserAttribute(this.kINDENTED, this.getTreePref('enableSubtreeIndent.'+orient) ? 'true' : null); this.setTabbrowserAttribute(this.kALLOW_COLLAPSE, this.getTreePref('allowSubtreeCollapseExpand.'+orient) ? 'true' : null); - this.setTabbrowserAttribute(this.kHIDE_ALLTABS, this.getTreePref('tabbar.hideAlltabsButton.'+orient) ? 'true' : null); + + if (!this.isFloating) + this.setTabbrowserAttribute(this.kHIDE_ALLTABS, this.getTreePref('tabbar.hideAlltabsButton.'+orient) ? 'true' : null); this.updateAllTabsIndent(); }, @@ -1498,17 +1500,21 @@ TreeStyleTabBrowser.prototype = { var oldState = { fixed : this.isFixed, indented : b.getAttribute(this.kINDENTED) == 'true', - canCollapse : b.getAttribute(this.kALLOW_COLLAPSE) == 'true', - alltabsButton : b.getAttribute(this.kHIDE_ALLTABS) != 'true' + canCollapse : b.getAttribute(this.kALLOW_COLLAPSE) == 'true' }; - oldState.allTabsButton = oldState.alltabsButton; + if (!this.isFloating) { + oldState.alltabsButton = b.getAttribute(this.kHIDE_ALLTABS) != 'true'; + oldState.allTabsButton = oldState.alltabsButton; + } var newState = { fixed : this.getTreePref('tabbar.fixed.'+orient), indented : this.getTreePref('enableSubtreeIndent.'+orient), - canCollapse : this.getTreePref('allowSubtreeCollapseExpand.'+orient), - alltabsButton : !this.getTreePref('tabbar.hideAlltabsButton.'+orient) + canCollapse : this.getTreePref('allowSubtreeCollapseExpand.'+orient) }; - newState.allTabsButton = newState.alltabsButton; + if (!this.isFloating) { + newState.alltabsButton = !this.getTreePref('tabbar.hideAlltabsButton.'+orient); + newState.allTabsButton = newState.alltabsButton; + } if (oldState.fixed == newState.fixed && oldState.indented == newState.indented && @@ -1532,10 +1538,12 @@ TreeStyleTabBrowser.prototype = { var state = { fixed : this.isFixed, indented : b.getAttribute(this.kINDENTED) == 'true', - canCollapse : b.getAttribute(this.kALLOW_COLLAPSE) == 'true', - alltabsButton : b.getAttribute(this.kHIDE_ALLTABS) != 'true' + canCollapse : b.getAttribute(this.kALLOW_COLLAPSE) == 'true' }; - state.allTabsButton = state.alltabsButton; + if (!this.isFloating) { + state.alltabsButton = b.getAttribute(this.kHIDE_ALLTABS) != 'true'; + state.allTabsButton = state.alltabsButton; + } /* PUBLIC API */ var event = document.createEvent('Events');