extensions-app: Add quit action

It's good practice to support the standard <ctrl>-q shortcut, so
add a corresponding action and set its accel accordingly.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3335
This commit is contained in:
Florian Müllner 2020-10-28 21:42:48 +01:00
parent a9a54ba2a3
commit 8d43deaad5

View File

@ -67,6 +67,12 @@ class Application extends Gtk.Application {
provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
const action = new Gio.SimpleAction({ name: 'quit' });
action.connect('activate', () => this._window.close());
this.add_action(action);
this.set_accels_for_action('app.quit', ['<Primary>q']);
this._shellProxy = new GnomeShellProxy(Gio.DBus.session,
'org.gnome.Shell.Extensions', '/org/gnome/Shell/Extensions');