From ba8902db1d778de8e7603cc43c047ccd54d020b6 Mon Sep 17 00:00:00 2001 From: piro Date: Tue, 2 Dec 2008 03:50:34 +0000 Subject: [PATCH] =?UTF-8?q?*=20=E3=82=BF=E3=83=96=E3=81=AE=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E8=A1=A8=E7=A4=BA=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92?= =?UTF-8?q?=E9=9A=A0=E3=81=99=E8=A8=AD=E5=AE=9A=E3=81=8CFirefox=203.1?= =?UTF-8?q?=E3=81=A7=E5=8A=B9=E3=81=84=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B?= =?UTF-8?q?=E3=81=A3=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20*=20?= =?UTF-8?q?=E3=80=8C=E6=96=B0=E3=81=97=E3=81=84=E3=82=BF=E3=83=96=E3=82=92?= =?UTF-8?q?=E9=96=8B=E3=81=8F=E3=80=8D=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92?= =?UTF-8?q?=E9=9A=A0=E3=81=99=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3?= 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@3426 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/config.js | 3 +++ content/treestyletab/config.xul | 9 +++++++++ content/treestyletab/treestyletab.css | 3 ++- content/treestyletab/treestyletab.js | 1 + content/treestyletab/treestyletabbrowser.js | 9 +++++++++ defaults/preferences/treestyletab.js | 1 + locale/de-DE/treestyletab/treestyletab.dtd | 1 + locale/en-US/treestyletab/treestyletab.dtd | 1 + locale/es-ES/treestyletab/treestyletab.dtd | 1 + locale/it-IT/treestyletab/treestyletab.dtd | 1 + locale/ja/treestyletab/treestyletab.dtd | 1 + locale/zh-CN/treestyletab/treestyletab.dtd | 1 + locale/zh-TW/treestyletab/treestyletab.dtd | 1 + 13 files changed, 32 insertions(+), 1 deletion(-) diff --git a/content/treestyletab/config.js b/content/treestyletab/config.js index 22aebe24..de6d7cf6 100644 --- a/content/treestyletab/config.js +++ b/content/treestyletab/config.js @@ -69,6 +69,7 @@ function onChangeTabbarPosition(aOnChange) var indentCheck = document.getElementById('extensions.treestyletab.enableSubtreeIndent-check'); var collapseCheck = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand-check'); // var autoHideCheck = document.getElementById('extensions.treestyletab.tabbar.autoHide.enabled-check'); + var hideNewTabCheck = document.getElementById('extensions.treestyletab.tabbar.hideNewTabButton-check'); var hideAllTabsCheck = document.getElementById('extensions.treestyletab.tabbar.hideAlltabsButton-check'); if (aOnChange) { @@ -78,11 +79,13 @@ function onChangeTabbarPosition(aOnChange) if (pos == 'left' || pos == 'right') { indentCheck.setAttribute('collapsed', true); // autoHideCheck.removeAttribute('collapsed'); + hideNewTabCheck.removeAttribute('collapsed'); hideAllTabsCheck.removeAttribute('collapsed'); } else { indentCheck.removeAttribute('collapsed'); // autoHideCheck.setAttribute('collapsed', true); + hideNewTabCheck.setAttribute('collapsed', true); hideAllTabsCheck.setAttribute('collapsed', true); } diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul index fbcf111e..7c05bdb1 100644 --- a/content/treestyletab/config.xul +++ b/content/treestyletab/config.xul @@ -29,6 +29,10 @@ + + + + diff --git a/content/treestyletab/treestyletab.css b/content/treestyletab/treestyletab.css index f3f8441b..9e0fbe4d 100644 --- a/content/treestyletab/treestyletab.css +++ b/content/treestyletab/treestyletab.css @@ -28,8 +28,9 @@ tabbrowser[treestyletab-tabbar-fixed="true"] .tabbrowser-strip+splitter { tabbrowser:not([treestyletab-mode="horizontal"]) .tabbrowser-arrowscrollbox > .scrollbutton-up, tabbrowser:not([treestyletab-mode="horizontal"]) .tabbrowser-arrowscrollbox > .scrollbutton-down-stack, tabbrowser:not([treestyletab-mode="horizontal"]) .tabbrowser-arrowscrollbox > .scrollbutton-down, /* Firefox 3 */ +tabbrowser[treestyletab-hide-newtab-button="true"] .tabs-newtab-button, /* "open a new tab" button in Firefox 3.1 */ tabbrowser[treestyletab-hide-alltabs-button="true"] .tabs-alltabs-stack, -tabbrowser[treestyletab-hide-alltabs-button="true"] .tabbrowser-arrowscrollbox + stack, /* "all tabs" button in Firefox 3 */ +tabbrowser[treestyletab-hide-alltabs-button="true"] .tabbrowser-arrowscrollbox ~ stack, /* "all tabs" button in Firefox 3 and 3.1 */ tabbrowser[treestyletab-mode="vertical"] .tabs-closebutton-box, tabbrowser:not([treestyletab-mode="horizontal"]) .tab-drop-indicator-bar, tabbrowser:not([treestyletab-mode="horizontal"]) #vide-bar, /* Tab Mix Plus */ diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 7a4f3e28..71d40392 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -14,6 +14,7 @@ var TreeStyleTabService = { kUI_INVERTED : 'treestyletab-appearance-inverted', kSCROLLBAR_INVERTED : 'treestyletab-scrollbar-inverted', kALLOW_COLLAPSE : 'treestyletab-allow-subtree-collapse', + kHIDE_NEWTAB : 'treestyletab-hide-newtab-button', kHIDE_ALLTABS : 'treestyletab-hide-alltabs-button', kSTYLE : 'treestyletab-style', kTWISTY_STYLE : 'treestyletab-twisty-style', diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index ca1908dc..93727f0e 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -429,6 +429,7 @@ TreeStyleTabBrowser.prototype = { this.observe(null, 'nsPref:changed', 'extensions.treestyletab.twisty.style'); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.showBorderForFirstTab'); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.invertScrollbar'); + this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.hideNewTabButton'); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.hideAlltabsButton'); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.allowSubtreeCollapseExpand'); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.fixed'); @@ -956,6 +957,14 @@ TreeStyleTabBrowser.prototype = { b.removeAttribute(this.kSCROLLBAR_INVERTED); break; + case 'extensions.treestyletab.tabbar.hideNewTabButton': + var pos = b.getAttribute(this.kTABBAR_POSITION); + if (value && (pos == 'left' || pos == 'right')) + b.setAttribute(this.kHIDE_NEWTAB, true); + else + b.removeAttribute(this.kHIDE_NEWTAB); + break; + case 'extensions.treestyletab.tabbar.hideAlltabsButton': var pos = b.getAttribute(this.kTABBAR_POSITION); if (value && (pos == 'left' || pos == 'right')) diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index d9a9d123..70db2296 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -5,6 +5,7 @@ pref("extensions.treestyletab.tabbar.position.subbrowser.enabled", false); pref("extensions.treestyletab.tabbar.multirow", false); pref("extensions.treestyletab.tabbar.invertScrollbar", true); pref("extensions.treestyletab.tabbar.invertUI", true); +pref("extensions.treestyletab.tabbar.hideNewTabButton", false); pref("extensions.treestyletab.tabbar.hideAlltabsButton", true); pref("extensions.treestyletab.tabbar.scroll.smooth", true); pref("extensions.treestyletab.tabbar.scroll.timeout", 250); diff --git a/locale/de-DE/treestyletab/treestyletab.dtd b/locale/de-DE/treestyletab/treestyletab.dtd index 51f607b3..4a50725a 100644 --- a/locale/de-DE/treestyletab/treestyletab.dtd +++ b/locale/de-DE/treestyletab/treestyletab.dtd @@ -14,6 +14,7 @@ + diff --git a/locale/en-US/treestyletab/treestyletab.dtd b/locale/en-US/treestyletab/treestyletab.dtd index d997ba1b..9dd67a99 100644 --- a/locale/en-US/treestyletab/treestyletab.dtd +++ b/locale/en-US/treestyletab/treestyletab.dtd @@ -14,6 +14,7 @@ + diff --git a/locale/es-ES/treestyletab/treestyletab.dtd b/locale/es-ES/treestyletab/treestyletab.dtd index 072d2cb5..9db3efb1 100644 --- a/locale/es-ES/treestyletab/treestyletab.dtd +++ b/locale/es-ES/treestyletab/treestyletab.dtd @@ -14,6 +14,7 @@ + diff --git a/locale/it-IT/treestyletab/treestyletab.dtd b/locale/it-IT/treestyletab/treestyletab.dtd index 9b36a7bd..c6360336 100644 --- a/locale/it-IT/treestyletab/treestyletab.dtd +++ b/locale/it-IT/treestyletab/treestyletab.dtd @@ -14,6 +14,7 @@ + diff --git a/locale/ja/treestyletab/treestyletab.dtd b/locale/ja/treestyletab/treestyletab.dtd index d59bb792..5652503a 100644 --- a/locale/ja/treestyletab/treestyletab.dtd +++ b/locale/ja/treestyletab/treestyletab.dtd @@ -14,6 +14,7 @@ + diff --git a/locale/zh-CN/treestyletab/treestyletab.dtd b/locale/zh-CN/treestyletab/treestyletab.dtd index c6bff90e..d02102f1 100644 --- a/locale/zh-CN/treestyletab/treestyletab.dtd +++ b/locale/zh-CN/treestyletab/treestyletab.dtd @@ -14,6 +14,7 @@ + diff --git a/locale/zh-TW/treestyletab/treestyletab.dtd b/locale/zh-TW/treestyletab/treestyletab.dtd index a7e94324..6bd01cb3 100644 --- a/locale/zh-TW/treestyletab/treestyletab.dtd +++ b/locale/zh-TW/treestyletab/treestyletab.dtd @@ -14,6 +14,7 @@ +