ui: Add InhibitShortcutsDialog

https://bugzilla.gnome.org/show_bug.cgi?id=783342
This commit is contained in:
Florian Müllner
2017-07-14 03:15:17 +02:00
parent 942831f6ee
commit dff3e4e0b9
9 changed files with 152 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ enum
FILTER_KEYBINDING,
CONFIRM_DISPLAY_CHANGE,
CREATE_CLOSE_DIALOG,
CREATE_INHIBIT_SHORTCUTS_DIALOG,
LAST_SIGNAL
};
@@ -185,6 +186,22 @@ shell_wm_class_init (ShellWMClass *klass)
0,
NULL, NULL, NULL,
META_TYPE_CLOSE_DIALOG, 1, META_TYPE_WINDOW);
/**
* ShellWM::create-inhibit-shortcuts-dialog:
* @wm: The WM
* @window: The window to create the dialog for
*
* Creates an inhibit shortcuts dialog for the given window.
*
* Returns: (transfer full): The inhibit shortcuts dialog instance.
*/
shell_wm_signals[CREATE_INHIBIT_SHORTCUTS_DIALOG] =
g_signal_new ("create-inhibit-shortcuts-dialog",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
META_TYPE_INHIBIT_SHORTCUTS_DIALOG, 1, META_TYPE_WINDOW);
}
void
@@ -414,6 +431,17 @@ _shell_wm_create_close_dialog (ShellWM *wm,
return dialog;
}
MetaInhibitShortcutsDialog *
_shell_wm_create_inhibit_shortcuts_dialog (ShellWM *wm,
MetaWindow *window)
{
MetaInhibitShortcutsDialog *dialog;
g_signal_emit (wm, shell_wm_signals[CREATE_INHIBIT_SHORTCUTS_DIALOG], 0, window, &dialog);
return dialog;
}
/**
* shell_wm_new:
* @plugin: the #MetaPlugin