ctrl -> accel

Ctrl-Tabでのタブバー表示がOFFの時でもタブを切り替えるとタブバーが表示されていたのを修正

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@2017 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2008-03-09 12:18:58 +00:00
parent 3796a2ec32
commit 23086d1184
9 changed files with 24 additions and 17 deletions

View File

@ -336,8 +336,8 @@
<preference id="extensions.treestyletab.tabbar.autoHide.enabled" <preference id="extensions.treestyletab.tabbar.autoHide.enabled"
name="extensions.treestyletab.tabbar.autoHide.enabled" name="extensions.treestyletab.tabbar.autoHide.enabled"
type="bool"/> type="bool"/>
<preference id="extensions.treestyletab.tabbar.autoShow.ctrlKeyDown" <preference id="extensions.treestyletab.tabbar.autoShow.accelKeyDown"
name="extensions.treestyletab.tabbar.autoShow.ctrlKeyDown" name="extensions.treestyletab.tabbar.autoShow.accelKeyDown"
type="bool"/> type="bool"/>
<preference id="extensions.treestyletab.tabbar.autoShow.tabSwitch" <preference id="extensions.treestyletab.tabbar.autoShow.tabSwitch"
name="extensions.treestyletab.tabbar.autoShow.tabSwitch" name="extensions.treestyletab.tabbar.autoShow.tabSwitch"
@ -354,9 +354,9 @@
label="&config.tabbar.autoHide.enabled;"/> label="&config.tabbar.autoHide.enabled;"/>
<groupbox orient="vertical"> <groupbox orient="vertical">
<caption label="&config.tabbar.autoShow.caption;"/> <caption label="&config.tabbar.autoShow.caption;"/>
<checkbox id="extensions.treestyletab.tabbar.autoShow.ctrlKeyDown-check" <checkbox id="extensions.treestyletab.tabbar.autoShow.accelKeyDown-check"
preference="extensions.treestyletab.tabbar.autoShow.ctrlKeyDown" preference="extensions.treestyletab.tabbar.autoShow.accelKeyDown"
label="&config.tabbar.autoShow.ctrlKeyDown;"/> label="&config.tabbar.autoShow.accelKeyDown;"/>
<checkbox id="extensions.treestyletab.tabbar.autoShow.tabSwitch-check" <checkbox id="extensions.treestyletab.tabbar.autoShow.tabSwitch-check"
preference="extensions.treestyletab.tabbar.autoShow.tabSwitch" preference="extensions.treestyletab.tabbar.autoShow.tabSwitch"
label="&config.tabbar.autoShow.tabSwitch;"/> label="&config.tabbar.autoShow.tabSwitch;"/>

View File

@ -1257,21 +1257,24 @@ catch(e) {
!aEvent.altKey && !aEvent.altKey &&
(navigator.platform.match(/mac/i) ? aEvent.metaKey : aEvent.ctrlKey ) (navigator.platform.match(/mac/i) ? aEvent.metaKey : aEvent.ctrlKey )
) { ) {
if (this.getTreePref('tabbar.autoShow.ctrlKeyDown') && if (this.getTreePref('tabbar.autoShow.accelKeyDown') &&
!sv.tabbarShown) { !sv.tabbarShown) {
this.delayedAutoShowTimer = window.setTimeout( this.delayedAutoShowTimer = window.setTimeout(
function(aSelf) { function(aSelf) {
aSelf.delayedAutoShowDone = true; aSelf.delayedAutoShowDone = true;
aSelf.accelKeyPressed = true;
sv.showTabbar(sv.kSHOWN_BY_SHORTCUT); sv.showTabbar(sv.kSHOWN_BY_SHORTCUT);
}, },
this.getTreePref('tabbar.autoShow.ctrlKeyDown.delay'), this.getTreePref('tabbar.autoShow.accelKeyDown.delay'),
this this
); );
this.delayedAutoShowDone = false; this.delayedAutoShowDone = false;
} }
} }
else else {
this.accelKeyPressed = false;
sv.hideTabbar(); sv.hideTabbar();
}
}, },
cancelDelayedAutoShow : function() cancelDelayedAutoShow : function()
{ {
@ -1282,6 +1285,7 @@ catch(e) {
}, },
delayedAutoShowTimer : null, delayedAutoShowTimer : null,
delayedAutoShowDone : true, delayedAutoShowDone : true,
accelKeyPressed : false,
onKeyRelease : function(aEvent) onKeyRelease : function(aEvent)
{ {
@ -1318,11 +1322,13 @@ catch(e) {
aEvent.charCode == 0 && aEvent.keyCode == 16 aEvent.charCode == 0 && aEvent.keyCode == 16
) )
) { ) {
dump('show/onKeyRelease\n'); this.accelKeyPressed = true;
sv.showTabbar(sv.kSHOWN_BY_SHORTCUT); sv.showTabbar(sv.kSHOWN_BY_SHORTCUT);
return; return;
} }
this.accelKeyPressed = false;
if (sv.showHideTabbarReason == sv.kSHOWN_BY_SHORTCUT) if (sv.showHideTabbarReason == sv.kSHOWN_BY_SHORTCUT)
sv.hideTabbar(); sv.hideTabbar();
}, },

View File

@ -1442,7 +1442,8 @@ TreeStyleTabBrowser.prototype = {
this.updateInvertedTabContentsOrder(); this.updateInvertedTabContentsOrder();
this.showTabbarForFeedback(); if (!this.accelKeyPressed)
this.showTabbarForFeedback();
}, },
onTabClick : function(aEvent) onTabClick : function(aEvent)

View File

@ -11,8 +11,8 @@ pref("extensions.treestyletab.tabbar.autoHide.enabled", false);
pref("extensions.treestyletab.tabbar.autoHide.delay", 50); pref("extensions.treestyletab.tabbar.autoHide.delay", 50);
pref("extensions.treestyletab.tabbar.autoHide.area", 25); pref("extensions.treestyletab.tabbar.autoHide.area", 25);
pref("extensions.treestyletab.tabbar.autoHide.expandArea", false); pref("extensions.treestyletab.tabbar.autoHide.expandArea", false);
pref("extensions.treestyletab.tabbar.autoShow.ctrlKeyDown", true); pref("extensions.treestyletab.tabbar.autoShow.accelKeyDown", true);
pref("extensions.treestyletab.tabbar.autoShow.ctrlKeyDown.delay", 800); pref("extensions.treestyletab.tabbar.autoShow.accelKeyDown.delay", 800);
pref("extensions.treestyletab.tabbar.autoShow.tabSwitch", true); pref("extensions.treestyletab.tabbar.autoShow.tabSwitch", true);
pref("extensions.treestyletab.tabbar.autoShow.feedback", true); pref("extensions.treestyletab.tabbar.autoShow.feedback", true);
pref("extensions.treestyletab.tabbar.autoShow.feedback.delay", 3000); pref("extensions.treestyletab.tabbar.autoShow.feedback.delay", 3000);

View File

@ -72,7 +72,7 @@
<!ENTITY config.tabbar.autoHide.enabled "Auto hide tab bar"> <!ENTITY config.tabbar.autoHide.enabled "Auto hide tab bar">
<!ENTITY config.tabbar.autoShow.caption "Show tab bar automatically when"> <!ENTITY config.tabbar.autoShow.caption "Show tab bar automatically when">
<!ENTITY config.tabbar.autoShow.ctrlKeyDown "Control(Command) key is pressed a while"> <!ENTITY config.tabbar.autoShow.accelKeyDown "Control(Command) key is pressed a while">
<!ENTITY config.tabbar.autoShow.tabSwitch "Control(Command)-Tab to switch tabs"> <!ENTITY config.tabbar.autoShow.tabSwitch "Control(Command)-Tab to switch tabs">
<!ENTITY config.tabbar.autoShow.feedback "Nwe tabs are opened or some tabs are closed"> <!ENTITY config.tabbar.autoShow.feedback "Nwe tabs are opened or some tabs are closed">

View File

@ -72,7 +72,7 @@
<!ENTITY config.tabbar.autoHide.enabled "Auto-ocultar la barra de pestañas"> <!ENTITY config.tabbar.autoHide.enabled "Auto-ocultar la barra de pestañas">
<!ENTITY config.tabbar.autoShow.caption "Show tab bar automatically when"> <!ENTITY config.tabbar.autoShow.caption "Show tab bar automatically when">
<!ENTITY config.tabbar.autoShow.ctrlKeyDown "Control(Command) key is pressed a while"> <!ENTITY config.tabbar.autoShow.accelKeyDown "Control(Command) key is pressed a while">
<!ENTITY config.tabbar.autoShow.tabSwitch "Control(Command)-Tab to switch tabs"> <!ENTITY config.tabbar.autoShow.tabSwitch "Control(Command)-Tab to switch tabs">
<!ENTITY config.tabbar.autoShow.feedback "Nwe tabs are opened or some tabs are closed"> <!ENTITY config.tabbar.autoShow.feedback "Nwe tabs are opened or some tabs are closed">

View File

@ -72,7 +72,7 @@
<!ENTITY config.tabbar.autoHide.enabled "Nascondi automaticamente la barra delle schede"> <!ENTITY config.tabbar.autoHide.enabled "Nascondi automaticamente la barra delle schede">
<!ENTITY config.tabbar.autoShow.caption "Show tab bar automatically when"> <!ENTITY config.tabbar.autoShow.caption "Show tab bar automatically when">
<!ENTITY config.tabbar.autoShow.ctrlKeyDown "Control(Command) key is pressed a while"> <!ENTITY config.tabbar.autoShow.accelKeyDown "Control(Command) key is pressed a while">
<!ENTITY config.tabbar.autoShow.tabSwitch "Control(Command)-Tab to switch tabs"> <!ENTITY config.tabbar.autoShow.tabSwitch "Control(Command)-Tab to switch tabs">
<!ENTITY config.tabbar.autoShow.feedback "Nwe tabs are opened or some tabs are closed"> <!ENTITY config.tabbar.autoShow.feedback "Nwe tabs are opened or some tabs are closed">

View File

@ -72,7 +72,7 @@
<!ENTITY config.tabbar.autoHide.enabled "タブバーを自動的に隠す"> <!ENTITY config.tabbar.autoHide.enabled "タブバーを自動的に隠す">
<!ENTITY config.tabbar.autoShow.caption "以下の場合に自動的にタブバーを表示する"> <!ENTITY config.tabbar.autoShow.caption "以下の場合に自動的にタブバーを表示する">
<!ENTITY config.tabbar.autoShow.ctrlKeyDown "Control(Command)キーを長押しした時"> <!ENTITY config.tabbar.autoShow.accelKeyDown "Control(Command)キーを長押しした時">
<!ENTITY config.tabbar.autoShow.tabSwitch "Control(Command)-Tabでタブを切り替える時"> <!ENTITY config.tabbar.autoShow.tabSwitch "Control(Command)-Tabでタブを切り替える時">
<!ENTITY config.tabbar.autoShow.feedback "新しいタブが開かれたりタブが閉じられたりした時"> <!ENTITY config.tabbar.autoShow.feedback "新しいタブが開かれたりタブが閉じられたりした時">

View File

@ -72,7 +72,7 @@
<!ENTITY config.tabbar.autoHide.enabled "自动隐藏标签栏"> <!ENTITY config.tabbar.autoHide.enabled "自动隐藏标签栏">
<!ENTITY config.tabbar.autoShow.caption "Show tab bar automatically when"> <!ENTITY config.tabbar.autoShow.caption "Show tab bar automatically when">
<!ENTITY config.tabbar.autoShow.ctrlKeyDown "Control(Command) key is pressed a while"> <!ENTITY config.tabbar.autoShow.accelKeyDown "Control(Command) key is pressed a while">
<!ENTITY config.tabbar.autoShow.tabSwitch "Control(Command)-Tab to switch tabs"> <!ENTITY config.tabbar.autoShow.tabSwitch "Control(Command)-Tab to switch tabs">
<!ENTITY config.tabbar.autoShow.feedback "Nwe tabs are opened or some tabs are closed"> <!ENTITY config.tabbar.autoShow.feedback "Nwe tabs are opened or some tabs are closed">