[gnome-shell] extensions-app: Add quit action
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensions-app: Add quit action
- Date: Thu, 29 Oct 2020 13:14:28 +0000 (UTC)
commit 8d43deaad5ea3d9c945101a4a4d2c1483d047e07
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Oct 28 21:42:48 2020 +0100
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
subprojects/extensions-app/js/main.js | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/subprojects/extensions-app/js/main.js b/subprojects/extensions-app/js/main.js
index aae5b9bfad..2e8b01804b 100644
--- a/subprojects/extensions-app/js/main.js
+++ b/subprojects/extensions-app/js/main.js
@@ -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');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]