[gnome-chess] Use set_accels_for_action ()



commit d59993473551ff9d09a22533e05e7f22aa23a693
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Sun Sep 21 00:29:46 2014 +0300

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

 src/gnome-chess.vala |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 5113f0f..c7f1063 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -1144,12 +1144,12 @@ public class ChessApplication : Gtk.Application
 
     private void add_accelerators ()
     {
-        add_accelerator ("<Primary>N", "win." + NEW_GAME_ACTION_NAME, null);
-        add_accelerator ("<Primary>O", "win." + OPEN_GAME_ACTION_NAME, null);
-        add_accelerator ("<Primary>S", "win." + SAVE_GAME_ACTION_NAME, null);
-        add_accelerator ("<Shift><Primary>S", "win." + SAVE_GAME_AS_ACTION_NAME, null);
-        add_accelerator ("<Primary>Z", "win." + UNDO_MOVE_ACTION_NAME, null);
-        add_accelerator ("Pause", "win." + PAUSE_RESUME_ACTION_NAME, null);
+        set_accels_for_action ("win." + NEW_GAME_ACTION_NAME, {"<Primary>N"});
+        set_accels_for_action ("win." + OPEN_GAME_ACTION_NAME, {"<Primary>O"});
+        set_accels_for_action ("win." + SAVE_GAME_ACTION_NAME, {"<Primary>S"});
+        set_accels_for_action ("win." + SAVE_GAME_AS_ACTION_NAME, {"<Shift><Primary>S"});
+        set_accels_for_action ("win." + UNDO_MOVE_ACTION_NAME, {"<Primary>Z"});
+        set_accels_for_action ("win." + PAUSE_RESUME_ACTION_NAME, {"Pause"});
     }
 
     private void update_pause_resume_button ()


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