From 23086d1184d08096cce38aeed2a851618e79b8cf Mon Sep 17 00:00:00 2001 From: piro Date: Sun, 9 Mar 2008 12:18:58 +0000 Subject: [PATCH] =?UTF-8?q?ctrl=20->=20accel=20Ctrl-Tab=E3=81=A7=E3=81=AE?= =?UTF-8?q?=E3=82=BF=E3=83=96=E3=83=90=E3=83=BC=E8=A1=A8=E7=A4=BA=E3=81=8C?= =?UTF-8?q?OFF=E3=81=AE=E6=99=82=E3=81=A7=E3=82=82=E3=82=BF=E3=83=96?= =?UTF-8?q?=E3=82=92=E5=88=87=E3=82=8A=E6=9B=BF=E3=81=88=E3=82=8B=E3=81=A8?= =?UTF-8?q?=E3=82=BF=E3=83=96=E3=83=90=E3=83=BC=E3=81=8C=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= 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@2017 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/config.xul | 10 +++++----- content/treestyletab/treestyletab.js | 14 ++++++++++---- content/treestyletab/treestyletabbrowser.js | 3 ++- defaults/preferences/treestyletab.js | 4 ++-- 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/zh-CN/treestyletab/treestyletab.dtd | 2 +- 9 files changed, 24 insertions(+), 17 deletions(-) diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul index d0507ee2..1caaaf7e 100644 --- a/content/treestyletab/config.xul +++ b/content/treestyletab/config.xul @@ -336,8 +336,8 @@ - - + diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index fedd8462..c980d2b4 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -1257,21 +1257,24 @@ catch(e) { !aEvent.altKey && (navigator.platform.match(/mac/i) ? aEvent.metaKey : aEvent.ctrlKey ) ) { - if (this.getTreePref('tabbar.autoShow.ctrlKeyDown') && + if (this.getTreePref('tabbar.autoShow.accelKeyDown') && !sv.tabbarShown) { this.delayedAutoShowTimer = window.setTimeout( function(aSelf) { aSelf.delayedAutoShowDone = true; + aSelf.accelKeyPressed = true; sv.showTabbar(sv.kSHOWN_BY_SHORTCUT); }, - this.getTreePref('tabbar.autoShow.ctrlKeyDown.delay'), + this.getTreePref('tabbar.autoShow.accelKeyDown.delay'), this ); this.delayedAutoShowDone = false; } } - else + else { + this.accelKeyPressed = false; sv.hideTabbar(); + } }, cancelDelayedAutoShow : function() { @@ -1282,6 +1285,7 @@ catch(e) { }, delayedAutoShowTimer : null, delayedAutoShowDone : true, + accelKeyPressed : false, onKeyRelease : function(aEvent) { @@ -1318,11 +1322,13 @@ catch(e) { aEvent.charCode == 0 && aEvent.keyCode == 16 ) ) { -dump('show/onKeyRelease\n'); + this.accelKeyPressed = true; sv.showTabbar(sv.kSHOWN_BY_SHORTCUT); return; } + this.accelKeyPressed = false; + if (sv.showHideTabbarReason == sv.kSHOWN_BY_SHORTCUT) sv.hideTabbar(); }, diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 450b9bb3..e4412a56 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1442,7 +1442,8 @@ TreeStyleTabBrowser.prototype = { this.updateInvertedTabContentsOrder(); - this.showTabbarForFeedback(); + if (!this.accelKeyPressed) + this.showTabbarForFeedback(); }, onTabClick : function(aEvent) diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 2005d469..da1cbdee 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -11,8 +11,8 @@ pref("extensions.treestyletab.tabbar.autoHide.enabled", false); pref("extensions.treestyletab.tabbar.autoHide.delay", 50); pref("extensions.treestyletab.tabbar.autoHide.area", 25); pref("extensions.treestyletab.tabbar.autoHide.expandArea", false); -pref("extensions.treestyletab.tabbar.autoShow.ctrlKeyDown", true); -pref("extensions.treestyletab.tabbar.autoShow.ctrlKeyDown.delay", 800); +pref("extensions.treestyletab.tabbar.autoShow.accelKeyDown", true); +pref("extensions.treestyletab.tabbar.autoShow.accelKeyDown.delay", 800); pref("extensions.treestyletab.tabbar.autoShow.tabSwitch", true); pref("extensions.treestyletab.tabbar.autoShow.feedback", true); pref("extensions.treestyletab.tabbar.autoShow.feedback.delay", 3000); diff --git a/locale/en-US/treestyletab/treestyletab.dtd b/locale/en-US/treestyletab/treestyletab.dtd index a121ee8c..8db1653d 100644 --- a/locale/en-US/treestyletab/treestyletab.dtd +++ b/locale/en-US/treestyletab/treestyletab.dtd @@ -72,7 +72,7 @@ - + diff --git a/locale/es-ES/treestyletab/treestyletab.dtd b/locale/es-ES/treestyletab/treestyletab.dtd index 98316874..2bb85e09 100644 --- a/locale/es-ES/treestyletab/treestyletab.dtd +++ b/locale/es-ES/treestyletab/treestyletab.dtd @@ -72,7 +72,7 @@ - + diff --git a/locale/it-IT/treestyletab/treestyletab.dtd b/locale/it-IT/treestyletab/treestyletab.dtd index 4b135db2..f29e7b5e 100644 --- a/locale/it-IT/treestyletab/treestyletab.dtd +++ b/locale/it-IT/treestyletab/treestyletab.dtd @@ -72,7 +72,7 @@ - + diff --git a/locale/ja/treestyletab/treestyletab.dtd b/locale/ja/treestyletab/treestyletab.dtd index 82bc93c8..5317971f 100644 --- a/locale/ja/treestyletab/treestyletab.dtd +++ b/locale/ja/treestyletab/treestyletab.dtd @@ -72,7 +72,7 @@ - + diff --git a/locale/zh-CN/treestyletab/treestyletab.dtd b/locale/zh-CN/treestyletab/treestyletab.dtd index e5f751f4..a6830a92 100644 --- a/locale/zh-CN/treestyletab/treestyletab.dtd +++ b/locale/zh-CN/treestyletab/treestyletab.dtd @@ -72,7 +72,7 @@ - +