From e6b25d05559862d2f0bec91b128f0c58a9d3c9e9 Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 3 Dec 2008 13:17:40 +0000 Subject: [PATCH] =?UTF-8?q?=E6=97=A7=E6=9D=A5=E3=81=AE=E5=8B=95=E4=BD=9C?= =?UTF-8?q?=E3=81=AB=E6=88=BB=E3=81=99=E9=9A=A0=E3=81=97=E8=A8=AD=E5=AE=9A?= 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@3455 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 6 ++++++ content/treestyletab/treestyletabbrowser.js | 2 ++ defaults/preferences/treestyletab.js | 1 + 3 files changed, 9 insertions(+) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index cfde6391..14e31758 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -92,6 +92,7 @@ var TreeStyleTabService = { kINSERT_LAST : 1, baseLebelMargin : 12, + shouldDetectClickOnIndentSpaces : true, NSResolver : { lookupNamespaceURI : function(aPrefix) @@ -926,6 +927,7 @@ var TreeStyleTabService = { this.observe(null, 'nsPref:changed', 'extensions.treestyletab.levelMargin'); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.autoHide.mode'); + this.observe(null, 'nsPref:changed', 'extensions.treestyletab.clickOnIndentSpaces.enabled'); this.observe(null, 'nsPref:changed', 'browser.link.open_newwindow.restriction.override'); this.observe(null, 'nsPref:changed', 'browser.tabs.loadFolderAndReplace.override'); }, @@ -2027,6 +2029,10 @@ catch(e) { this.setPref(target, this.getPref(aPrefName)); break; + case 'extensions.treestyletab.clickOnIndentSpaces.enabled': + this.shouldDetectClickOnIndentSpaces = this.getPref(aPrefName); + break; + default: break; } diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index bc0117f0..9737760e 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1693,6 +1693,8 @@ TreeStyleTabBrowser.prototype = { }, getTabFromTabbarEvent : function(aEvent) { + if (!this.shouldDetectClickOnIndentSpaces) return null; + var tab = null; var clickedPoint = aEvent[this.positionProp]; Array.slice(this.mTabBrowser.mTabContainer.childNodes).some(function(aTab) { diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 70db2296..108037ea 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -40,6 +40,7 @@ pref("extensions.treestyletab.levelMargin", 12); // 0 = first child, 1 = last child pref("extensions.treestyletab.insertNewChildAt", 1); pref("extensions.treestyletab.twisty.style", "auto"); // none, retro, modern-black, modern-white, auto +pref("extensions.treestyletab.clickOnIndentSpaces.enabled", true); pref("extensions.treestyletab.show.openSelectionLinks", true); pref("extensions.treestyletab.show.context-item-removeTabSubTree", true);