[gnome-chess/arnaudb/ctrl-p: 1/2] Add Ctrl-P pause shortcut.



commit 46ab8f5e51af7c982f21948ce160432673d9f972
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Apr 8 19:28:58 2020 +0200

    Add Ctrl-P pause shortcut.

 data/help-overlay.ui |  2 +-
 src/gnome-chess.vala | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/data/help-overlay.ui b/data/help-overlay.ui
index 8d5da56..690d7c1 100644
--- a/data/help-overlay.ui
+++ b/data/help-overlay.ui
@@ -27,7 +27,7 @@
             <child>
               <object class="GtkShortcutsShortcut">
                 <property name="visible">1</property>
-                <property name="accelerator">Pause</property>
+                <property name="accelerator">&lt;Ctrl&gt;P Pause</property>
                 <property name="title" translatable="yes" context="shortcut window">Pause the game</property>
               </object>
             </child>
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 69c3e9c..e06554c 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -179,13 +179,13 @@ Copyright © 2015–2016 Sahil Sareen""";
         update_pause_resume_button ();
 
         window.add_action_entries (window_entries, this);
-        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"});
-
+        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,   {        "<Primary>p",
+                                                                                      "Pause"   });
         add_window (window);
 
         scene = new ChessScene ();


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