[gnome-klotski] Set accels in the app-menu.



commit 433b84656b5b112183d96af23583c9f388738ad3
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sun Feb 22 00:37:36 2015 +0100

    Set accels in the app-menu.

 data/klotski-menus.ui  |    2 ++
 src/gnome-klotski.vala |    2 --
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/data/klotski-menus.ui b/data/klotski-menus.ui
index e6a669e..0adc4cc 100644
--- a/data/klotski-menus.ui
+++ b/data/klotski-menus.ui
@@ -12,6 +12,7 @@
       <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</attribute>
@@ -20,6 +21,7 @@
       <item>
         <attribute name="label" translatable="yes">_Quit</attribute>
         <attribute name="action">app.quit</attribute>
+        <attribute name="accel">&lt;Primary&gt;q</attribute>
       </item>
     </section>
   </menu>
diff --git a/src/gnome-klotski.vala b/src/gnome-klotski.vala
index 54ffc32..f1adff7 100644
--- a/src/gnome-klotski.vala
+++ b/src/gnome-klotski.vala
@@ -514,8 +514,6 @@ public class Klotski : Gtk.Application
         prev_puzzle = window.lookup_action ("prev-puzzle") as SimpleAction;
         next_puzzle = window.lookup_action ("next-puzzle") as SimpleAction;
         start_game = window.lookup_action ("start-game") as SimpleAction;
-        set_accels_for_action ("app.help", {"F1"});
-        set_accels_for_action ("app.quit", {"<Primary>q"});
         // set_accels_for_action ("win.start-game", {"<Primary>n"}); /* or <Primary>r ? or both ? */
         set_accels_for_action ("win.prev-puzzle", {"Up"});       // TODO
         set_accels_for_action ("win.next-puzzle", {"Down"});     // TODO a weird behaviour exists when you 
first change puzzle pack, then go to


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