[gnome-documents] application: use gtk_application_set_accels_for_action
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] application: use gtk_application_set_accels_for_action
- Date: Tue, 18 Mar 2014 14:31:11 +0000 (UTC)
commit 2e6731de055e7a627bfe070345acdcf6a94dd385
Author: Daniel Goetz <odessa2 web de>
Date: Tue Mar 18 11:29:30 2014 -0300
application: use gtk_application_set_accels_for_action
So we can support multiple accels with the same target.
https://bugzilla.gnome.org/show_bug.cgi?id=693830
src/application.js | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index edbcd43..e92fcd8 100644
--- a/src/application.js
+++ b/src/application.js
@@ -249,6 +249,9 @@ const Application = new Lang.Class({
if (actionEntry.accel)
this.add_accelerator(actionEntry.accel, 'app.' + actionEntry.name, null);
+ if (actionEntry.accels)
+ this.set_accels_for_action('app.' + actionEntry.name, actionEntry.accels);
+
this.add_action(action);
}));
},
@@ -447,9 +450,7 @@ const Application = new Lang.Class({
window_mode: WindowMode.WindowMode.PREVIEW },
{ name: 'find-prev', accel: '<Shift><Primary>g',
window_mode: WindowMode.WindowMode.PREVIEW },
- { name: 'zoom-in', accel: '<Primary>plus',
- window_mode: WindowMode.WindowMode.PREVIEW },
- { name: 'zoom-in', accel: '<Primary>equal',
+ { name: 'zoom-in', accels: ['<Primary>plus', '<Primary>equal'],
window_mode: WindowMode.WindowMode.PREVIEW },
{ name: 'zoom-out', accel: '<Primary>minus',
window_mode: WindowMode.WindowMode.PREVIEW },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]