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 @@
+