[gnome-documents] application: Remove deprecated API usage



commit d73a1709a92c6d9d596eaa6e8d3de596d2f8dfc9
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Nov 13 15:56:20 2015 +0100

    application: Remove deprecated API usage
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758061

 src/application.js |   35 ++++++++++++++++-------------------
 1 files changed, 16 insertions(+), 19 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index f0b28b0..7c8243b 100644
--- a/src/application.js
+++ b/src/application.js
@@ -297,9 +297,6 @@ const Application = new Lang.Class({
                 if (actionEntry.callback)
                     action.connect('activate', Lang.bind(this, actionEntry.callback));
 
-                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);
 
@@ -536,16 +533,16 @@ const Application = new Lang.Class({
         this._actionEntries = [
             { name: 'quit',
               callback: this._onActionQuit,
-              accel: '<Primary>q' },
+              accels: ['<Primary>q'] },
             { name: 'about',
               callback: this._onActionAbout },
             { name: 'help',
               callback: this._onActionHelp,
-              accel: 'F1' },
+              accels: ['F1'] },
             { name: 'fullscreen',
               callback: this._onActionFullscreen,
               create_hook: this._fullscreenCreateHook,
-              accel: 'F11',
+              accels: ['F11'],
               window_mode: WindowMode.WindowMode.PREVIEW },
             { name: 'night-mode',
               callback: this._onActionNightMode,
@@ -554,7 +551,7 @@ const Application = new Lang.Class({
             { name: 'gear-menu',
               callback: this._onActionToggle,
               state: GLib.Variant.new('b', false),
-              accel: 'F10' },
+              accels: ['F10'] },
             { name: 'view-as',
               callback: this._onActionViewAs,
               create_hook: this._viewAsCreateHook,
@@ -581,27 +578,27 @@ const Application = new Lang.Class({
               window_mode: WindowMode.WindowMode.PREVIEW,
               callback: this._onActionToggle,
               state: GLib.Variant.new('b', false),
-              accel: 'F5' },
-            { name: 'print-current', accel: '<Primary>p',
+              accels: ['F5'] },
+            { name: 'print-current', accels: ['<Primary>p'],
               callback: this._onActionPrintCurrent,
               window_mode: WindowMode.WindowMode.PREVIEW },
             { name: 'search',
               callback: this._onActionToggle,
               state: GLib.Variant.new('b', false),
-              accel: '<Primary>f' },
-            { name: 'find-next', accel: '<Primary>g',
+              accels: ['<Primary>f'] },
+            { name: 'find-next', accels: ['<Primary>g'],
               window_mode: WindowMode.WindowMode.PREVIEW },
-            { name: 'find-prev', accel: '<Shift><Primary>g',
+            { name: 'find-prev', accels: ['<Shift><Primary>g'],
               window_mode: WindowMode.WindowMode.PREVIEW },
             { name: 'zoom-in', accels: ['<Primary>plus', '<Primary>equal'],
               window_mode: WindowMode.WindowMode.PREVIEW },
-            { name: 'zoom-out', accel: '<Primary>minus',
+            { name: 'zoom-out', accels: ['<Primary>minus'],
               window_mode: WindowMode.WindowMode.PREVIEW },
-            { name: 'rotate-left', accel: '<Primary>Left',
+            { name: 'rotate-left', accels: ['<Primary>Left'],
               window_mode: WindowMode.WindowMode.PREVIEW },
-            { name: 'rotate-right', accel: '<Primary>Right',
+            { name: 'rotate-right', accels: ['<Primary>Right'],
               window_mode: WindowMode.WindowMode.PREVIEW },
-            { name: 'select-all', accel: '<Primary>a',
+            { name: 'select-all', accels: ['<Primary>a'],
               window_modes: [WindowMode.WindowMode.COLLECTIONS,
                              WindowMode.WindowMode.DOCUMENTS,
                              WindowMode.WindowMode.SEARCH] },
@@ -615,13 +612,13 @@ const Application = new Lang.Class({
             { name: 'bookmark-page',
               callback: this._onActionToggle,
               state: GLib.Variant.new('b', false),
-              accel: '<Primary>d',
+              accels: ['<Primary>d'],
               window_mode: WindowMode.WindowMode.PREVIEW },
             { name: 'places',
-              accel: '<Primary>b',
+              accels: ['<Primary>b'],
               window_mode: WindowMode.WindowMode.PREVIEW },
             { name: 'copy',
-              accel: '<Primary>c',
+              accels: ['<Primary>c'],
               window_mode: WindowMode.WindowMode.PREVIEW },
             { name: 'search-source',
               parameter_type: 's',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]