Bug 624588 - Change Panorama shortcut to Shift+Accel+E. r=dao

--HG--
extra : rebase_source : 9101e16c19adf2f5e9422c0eb1a2fecc18c35fb1
This commit is contained in:
David Dahl 2011-01-16 10:54:17 +01:00
parent 23f0dcba7c
commit 3595905b55
5 changed files with 11 additions and 11 deletions

View File

@ -347,7 +347,7 @@
<key id="key_switchTextDirection" key="&bidiSwitchTextDirectionItem.commandkey;" command="cmd_switchTextDirection" modifiers="accel,shift" />
<key id="key_tabview" key="&tabView.commandkey;" command="Browser:ToggleTabView" modifiers="accel"/>
<key id="key_tabview" key="&tabView.commandkey;" command="Browser:ToggleTabView" modifiers="accel,shift"/>
<key id="key_privatebrowsing" command="Tools:PrivateBrowsing" key="&privateBrowsingCmd.commandkey;" modifiers="accel,shift"/>
<key id="key_sanitize" command="Tools:Sanitize" keycode="VK_DELETE" modifiers="accel,shift"/>

View File

@ -91,5 +91,5 @@ function toggleTabViewTest(contentWindow) {
}
contentWindow.addEventListener("tabviewhidden", onTabViewHidden, false);
// Use keyboard shortcut to toggle back to browser view
EventUtils.synthesizeKey("e", { accelKey: true });
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true });
}

View File

@ -63,7 +63,7 @@ function onTabViewWindowLoaded() {
// verify that the keyboard combo works (this is the crux of bug 595518)
// Prepare the key combo
window.addEventListener("tabviewshown", onTabViewShown, false);
EventUtils.synthesizeKey("e", { accelKey: true }, contentWindow);
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true }, contentWindow);
}
let onTabViewShown = function() {

View File

@ -75,7 +75,7 @@ function onTabViewWindowLoaded() {
// the appropriate group would get selected when the key
// combination is pressed
executeSoon(function() {
EventUtils.synthesizeKey("e", {accelKey : true}, contentWindow);
EventUtils.synthesizeKey("e", {accelKey : true, shiftKey: true}, contentWindow);
});
});

View File

@ -40,7 +40,7 @@ let tabViewShownCount = 0;
// ----------
function test() {
waitForExplicitFinish();
// verify initial state
ok(!TabView.isVisible(), "Tab View starts hidden");
@ -54,7 +54,7 @@ function test() {
// ----------
function onTabViewLoadedAndShown() {
window.removeEventListener("tabviewshown", onTabViewLoadedAndShown, false);
// Evidently sometimes isVisible (which is based on the selectedIndex of the
// tabview deck) isn't updated immediately when called from button.doCommand,
// so we add a little timeout here to get outside of the doCommand call.
@ -66,7 +66,7 @@ function onTabViewLoadedAndShown() {
if (deck.selectedIndex == 1) {
ok(TabView.isVisible(), "Tab View is visible. Count: " + tabViewShownCount);
tabViewShownCount++;
// kick off the series
window.addEventListener("tabviewshown", onTabViewShown, false);
window.addEventListener("tabviewhidden", onTabViewHidden, false);
@ -75,7 +75,7 @@ function onTabViewLoadedAndShown() {
setTimeout(waitForSwitch, 10);
}
}
setTimeout(waitForSwitch, 1);
}
@ -87,17 +87,17 @@ function onTabViewShown() {
TabView.toggle();
}
// ----------
// ----------
function onTabViewHidden() {
ok(!TabView.isVisible(), "Tab View is hidden. Count: " + tabViewShownCount);
if (tabViewShownCount == 1) {
document.getElementById("menu_tabview").doCommand();
} else if (tabViewShownCount == 2) {
EventUtils.synthesizeKey("e", { accelKey: true });
EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true });
} else if (tabViewShownCount == 3) {
window.removeEventListener("tabviewshown", onTabViewShown, false);
window.removeEventListener("tabviewhidden", onTabViewHidden, false);
finish();
}
}
}