Enable Alt-f2 in overview

This isn't a long-term solution; what we really want is for Alt-F2 to
just be an application search with a hack to detect shell commands,
but in the short term this allows us to run the magic 'lg' command
from the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=595116
This commit is contained in:
Colin Walters 2009-09-14 15:08:20 -04:00
parent 8a2bfd0e55
commit 159690b2d3

View File

@ -68,10 +68,7 @@ function start() {
global.connect('panel-run-dialog', function(panel) { global.connect('panel-run-dialog', function(panel) {
// Make sure not more than one run dialog is shown. // Make sure not more than one run dialog is shown.
if (runDialog == null) { getRunDialog().open();
runDialog = new RunDialog.RunDialog();
}
runDialog.open();
}); });
overview = new Overview.Overview(); overview = new Overview.Overview();
@ -178,6 +175,8 @@ function _globalKeyPressHandler(actor, event) {
overview.hide(); overview.hide();
return true; return true;
} else if (symbol == Clutter.F2 && (event.get_state() & Clutter.ModifierType.MOD1_MASK)) {
getRunDialog().open();
} }
} }
@ -276,6 +275,13 @@ function createLookingGlass() {
return lookingGlass; return lookingGlass;
} }
function getRunDialog() {
if (runDialog == null) {
runDialog = new RunDialog.RunDialog();
}
return runDialog;
}
function createAppLaunchContext() { function createAppLaunchContext() {
let screen = global.screen; let screen = global.screen;
let display = screen.get_display(); let display = screen.get_display();