[gnome-shell] portalHelper: Handle Ctrl+W/Ctrl+Q to close window
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] portalHelper: Handle Ctrl+W/Ctrl+Q to close window
- Date: Thu, 19 Jan 2017 13:04:58 +0000 (UTC)
commit d200fb1d146b2fe651b901d49b61fb57a3a2f59f
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 17 15:01:01 2017 +0100
portalHelper: Handle Ctrl+W/Ctrl+Q to close window
https://bugzilla.gnome.org/show_bug.cgi?id=764133
js/portalHelper/main.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/js/portalHelper/main.js b/js/portalHelper/main.js
index 427fd85..3984642 100644
--- a/js/portalHelper/main.js
+++ b/js/portalHelper/main.js
@@ -74,6 +74,8 @@ const PortalWindow = new Lang.Class({
this._webView.show();
this.maximize();
this.present_with_time(timestamp);
+
+ this.application.set_accels_for_action('app.quit', ['<Primary>q', '<Primary>w']);
},
_syncTitle: function() {
@@ -168,6 +170,10 @@ const WebPortalHelper = new Lang.Class({
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(HelperDBusInterface, this);
this._queue = [];
+
+ let action = new Gio.SimpleAction({ name: 'quit' });
+ action.connect('activate', () => { this.active_window.destroy(); });
+ this.add_action(action);
},
vfunc_dbus_register: function(connection, path) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]