sessionMode: Add hasRunDialog property
Add a sessionMode.hasRunDialog property, which determines whether the keyboard shortcut to access the run dialog should be active or not. https://bugzilla.gnome.org/show_bug.cgi?id=676156
This commit is contained in:
parent
de69c719fb
commit
5264f39209
@ -135,10 +135,6 @@ function _initUserSession() {
|
|||||||
_initRecorder();
|
_initRecorder();
|
||||||
|
|
||||||
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT, false, -1, 1);
|
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT, false, -1, 1);
|
||||||
|
|
||||||
Meta.keybindings_set_custom_handler('panel-run-dialog', function() {
|
|
||||||
getRunDialog().open();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
@ -231,6 +227,12 @@ function start() {
|
|||||||
ExtensionSystem.loadExtensions();
|
ExtensionSystem.loadExtensions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sessionMode.hasRunDialog) {
|
||||||
|
Meta.keybindings_set_custom_handler('panel-run-dialog', function() {
|
||||||
|
getRunDialog().open();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (sessionMode.hasOverview) {
|
if (sessionMode.hasOverview) {
|
||||||
Meta.keybindings_set_custom_handler('panel-main-menu', function () {
|
Meta.keybindings_set_custom_handler('panel-main-menu', function () {
|
||||||
overview.toggle();
|
overview.toggle();
|
||||||
@ -610,6 +612,9 @@ function _globalKeyPressHandler(actor, event) {
|
|||||||
return true;
|
return true;
|
||||||
case Meta.KeyBindingAction.PANEL_RUN_DIALOG:
|
case Meta.KeyBindingAction.PANEL_RUN_DIALOG:
|
||||||
case Meta.KeyBindingAction.COMMAND_2:
|
case Meta.KeyBindingAction.COMMAND_2:
|
||||||
|
if (!sessionMode.hasRunDialog)
|
||||||
|
return false;
|
||||||
|
|
||||||
getRunDialog().open();
|
getRunDialog().open();
|
||||||
return true;
|
return true;
|
||||||
case Meta.KeyBindingAction.PANEL_MAIN_MENU:
|
case Meta.KeyBindingAction.PANEL_MAIN_MENU:
|
||||||
|
@ -14,6 +14,7 @@ const _modes = {
|
|||||||
allowSettings: false,
|
allowSettings: false,
|
||||||
allowExtensions: false,
|
allowExtensions: false,
|
||||||
allowKeybindingsWhenModal: true,
|
allowKeybindingsWhenModal: true,
|
||||||
|
hasRunDialog: false,
|
||||||
sessionType: Shell.SessionType.GDM },
|
sessionType: Shell.SessionType.GDM },
|
||||||
|
|
||||||
'user': { hasOverview: true,
|
'user': { hasOverview: true,
|
||||||
@ -22,6 +23,7 @@ const _modes = {
|
|||||||
allowSettings: true,
|
allowSettings: true,
|
||||||
allowExtensions: true,
|
allowExtensions: true,
|
||||||
allowKeybindingsWhenModal: false,
|
allowKeybindingsWhenModal: false,
|
||||||
|
hasRunDialog: true,
|
||||||
sessionType: Shell.SessionType.USER }
|
sessionType: Shell.SessionType.USER }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user