From c28d705406d5b449b356673eac9782b669d105ca Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 8 Apr 2009 16:00:51 +0000 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=83=8B=E3=83=A1=E3=83=BC=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E5=8A=B9=E6=9E=9C=E5=88=87=E3=82=8A=E6=9B=BF?= =?UTF-8?q?=E3=81=88=E3=81=AE=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=83=9C?= =?UTF-8?q?=E3=83=83=E3=82=AF=E3=82=B9?= 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@4099 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/config.xul | 10 +++++----- content/treestyletab/treestyletab.js | 12 ++++++++++++ content/treestyletab/treestyletabbrowser.js | 4 ++-- defaults/preferences/treestyletab.js | 2 +- locale/de-DE/treestyletab/treestyletab.dtd | 2 +- locale/en-US/treestyletab/treestyletab.dtd | 2 +- locale/es-ES/treestyletab/treestyletab.dtd | 2 +- locale/it-IT/treestyletab/treestyletab.dtd | 2 +- locale/ja/treestyletab/treestyletab.dtd | 2 +- locale/ru-RU/treestyletab/treestyletab.dtd | 2 +- locale/zh-CN/treestyletab/treestyletab.dtd | 2 +- locale/zh-TW/treestyletab/treestyletab.dtd | 2 +- 12 files changed, 28 insertions(+), 16 deletions(-) diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul index 2ac3e1df..a61d756a 100644 --- a/content/treestyletab/config.xul +++ b/content/treestyletab/config.xul @@ -14,8 +14,8 @@ - - + diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 4b63ab68..d3aabc63 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -100,6 +100,9 @@ var TreeStyleTabService = { baseIndent : 12, shouldDetectClickOnIndentSpaces : true, + smoothScrollEnabled : true, + smoothScrollDelay : 150, + animationEnabled : true, indentDelay : 200, collapseDelay : 150, @@ -1062,6 +1065,8 @@ var TreeStyleTabService = { this.observe(null, 'nsPref:changed', 'browser.link.open_newwindow.restriction.override'); this.observe(null, 'nsPref:changed', 'browser.tabs.loadFolderAndReplace.override'); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.style'); + this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.scroll.smooth'); + this.observe(null, 'nsPref:changed', 'extensions.treestyletab.tabbar.scroll.delay'); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.animation.enabled'); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.animation.indent.delay'); this.observe(null, 'nsPref:changed', 'extensions.treestyletab.animation.collapse.delay'); @@ -2172,6 +2177,13 @@ catch(e) { this.shouldDetectClickOnIndentSpaces = this.getPref(aPrefName); break; + case 'extensions.treestyletab.tabbar.scroll.smooth': + this.smoothScrollEnabled = value; + break; + case 'extensions.treestyletab.tabbar.scroll.delay': + this.smoothScrollDelay = value; + break; + case 'extensions.treestyletab.animation.enabled': this.animationEnabled = value; break; diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index f3a39bd1..cbaeaeeb 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -3234,7 +3234,7 @@ TreeStyleTabBrowser.prototype = { scrollTo : function(aEndX, aEndY) { - if (this.getTreePref('tabbar.scroll.smooth')) { + if (this.animationEnabled || this.smoothScrollEnabled) { this.smoothScrollTo(aEndX, aEndY); } else { @@ -3284,7 +3284,7 @@ TreeStyleTabBrowser.prototype = { }; window['piro.sakura.ne.jp'].animationManager.addTask( this.smoothScrollTask, - 0, 0, this.getTreePref('tabbar.scroll.timeout') + 0, 0, this.smoothScrollDelay ); }, smoothScrollTask : null, diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 0b39bc32..dfe7e94f 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -12,7 +12,7 @@ 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); +pref("extensions.treestyletab.tabbar.scroll.delay", 250); // default, vertigo, mixed pref("extensions.treestyletab.tabbar.style", "mixed"); // 0 = disabled, 1 = hide, 2 = shrink diff --git a/locale/de-DE/treestyletab/treestyletab.dtd b/locale/de-DE/treestyletab/treestyletab.dtd index 3689b03d..5595a310 100644 --- a/locale/de-DE/treestyletab/treestyletab.dtd +++ b/locale/de-DE/treestyletab/treestyletab.dtd @@ -3,7 +3,7 @@ - + diff --git a/locale/en-US/treestyletab/treestyletab.dtd b/locale/en-US/treestyletab/treestyletab.dtd index 117600ff..bb076fc0 100644 --- a/locale/en-US/treestyletab/treestyletab.dtd +++ b/locale/en-US/treestyletab/treestyletab.dtd @@ -3,7 +3,7 @@ - + diff --git a/locale/es-ES/treestyletab/treestyletab.dtd b/locale/es-ES/treestyletab/treestyletab.dtd index 68cc56fd..898ceb6c 100644 --- a/locale/es-ES/treestyletab/treestyletab.dtd +++ b/locale/es-ES/treestyletab/treestyletab.dtd @@ -3,7 +3,7 @@ - + diff --git a/locale/it-IT/treestyletab/treestyletab.dtd b/locale/it-IT/treestyletab/treestyletab.dtd index a78c6fdc..061780bd 100644 --- a/locale/it-IT/treestyletab/treestyletab.dtd +++ b/locale/it-IT/treestyletab/treestyletab.dtd @@ -3,7 +3,7 @@ - + diff --git a/locale/ja/treestyletab/treestyletab.dtd b/locale/ja/treestyletab/treestyletab.dtd index a16ea631..f1676760 100644 --- a/locale/ja/treestyletab/treestyletab.dtd +++ b/locale/ja/treestyletab/treestyletab.dtd @@ -3,7 +3,7 @@ - + diff --git a/locale/ru-RU/treestyletab/treestyletab.dtd b/locale/ru-RU/treestyletab/treestyletab.dtd index d92bcfda..e3eb13c0 100755 --- a/locale/ru-RU/treestyletab/treestyletab.dtd +++ b/locale/ru-RU/treestyletab/treestyletab.dtd @@ -3,7 +3,7 @@ - + diff --git a/locale/zh-CN/treestyletab/treestyletab.dtd b/locale/zh-CN/treestyletab/treestyletab.dtd index 1f1d585b..5a1016c5 100644 --- a/locale/zh-CN/treestyletab/treestyletab.dtd +++ b/locale/zh-CN/treestyletab/treestyletab.dtd @@ -3,7 +3,7 @@ - + diff --git a/locale/zh-TW/treestyletab/treestyletab.dtd b/locale/zh-TW/treestyletab/treestyletab.dtd index 69870ece..91bc87ec 100644 --- a/locale/zh-TW/treestyletab/treestyletab.dtd +++ b/locale/zh-TW/treestyletab/treestyletab.dtd @@ -3,7 +3,7 @@ - +