[gnome-chess] Ensure that F1, Ctrl+Q, and Ctrl+W work



commit a76b9bb592d67108255e2818184eb1d6fa2e921f
Author: Jeremy Bicha <jbicha ubuntu com>
Date:   Sat Dec 8 18:33:09 2018 -0500

    Ensure that F1, Ctrl+Q, and Ctrl+W work

 data/gnome-chess.ui  | 1 -
 src/gnome-chess.vala | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/data/gnome-chess.ui b/data/gnome-chess.ui
index 952c282..a132bb9 100644
--- a/data/gnome-chess.ui
+++ b/data/gnome-chess.ui
@@ -14,7 +14,6 @@
       <item>
         <attribute name="label" translatable="yes">_Help</attribute>
         <attribute name="action">app.help</attribute>
-        <attribute name="accel">F1</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">_About Chess</attribute>
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 0f60d80..e5a69f1 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -140,6 +140,8 @@ Copyright © 2015–2016 Sahil Sareen""";
         settings = new Settings ("org.gnome.chess");
 
         add_action_entries (app_entries, this);
+        set_accels_for_action ("app.help", {"F1"});
+        set_accels_for_action ("app.quit", {"<Primary>q", "<Primary>w"});
         Gtk.Builder builder = new Gtk.Builder.from_resource ("/org/gnome/chess/ui/gnome-chess.ui");
 
         window = (Gtk.ApplicationWindow) builder.get_object ("gnome_chess_app");


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