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