[gnome-chess] Restore keyboard accelerators



commit c4a0f80136e47c542c55f0fc8943a3d12fec65b1
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Jan 6 15:09:18 2014 -0600

    Restore keyboard accelerators

 src/gnome-chess.vala |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index a929d66..7217fd4 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -217,6 +217,7 @@ public class Application : Gtk.Application
             window.maximize ();
         }
 
+        add_accelerators ();
         update_window_menu ();
         show ();
     }
@@ -1032,6 +1033,14 @@ public class Application : Gtk.Application
             disable_window_action (UNDO_MOVE_ACTION_NAME);
     }
 
+    private void add_accelerators ()
+    {
+        add_accelerator ("<Control>N", "win." + NEW_GAME_ACTION_NAME, null);
+        add_accelerator ("<Control>O", "win." + OPEN_GAME_ACTION_NAME, null);
+        add_accelerator ("<Control>S", "win." + SAVE_GAME_ACTION_NAME, null);
+        add_accelerator ("<Control>Z", "win." + UNDO_MOVE_ACTION_NAME, null);
+    }
+
     private void update_window_menu ()
     {
         var window_menu = new Menu ();


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