[gnome-mines] Use set_accels_for_action().



commit 22dd0bc4359b110758f10011abe1b450f2923bf2
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Sep 9 05:54:21 2014 +0200

    Use set_accels_for_action().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736303

 src/gnome-mines.vala |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/gnome-mines.vala b/src/gnome-mines.vala
index 8bb779f..c8f3716 100644
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@ -187,12 +187,11 @@ public class Mines : Gtk.Application
             set_menubar (menu);
         }
 
-        add_accelerator ("<Primary>n", "app.new-game", null);
-        add_accelerator ("<Primary>r", "app.repeat-size", null);
-        add_accelerator ("Pause", "app.pause", null);
-        add_accelerator ("F1", "app.help", null);
-        add_accelerator ("<Primary>w", "app.quit", null);
-        add_accelerator ("<Primary>q", "app.quit", null);
+        set_accels_for_action ("app.new-game", {"<Primary>n"});
+        set_accels_for_action ("app.repeat-size", {"<Primary>r"});
+        set_accels_for_action ("app.pause", {"Pause"});
+        set_accels_for_action ("app.help", {"F1"});
+        set_accels_for_action ("app.quit", {"<Primary>q", "<Primary>w"});
 
         minefield_view = new MinefieldView (settings);
         minefield_view.show ();


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