[gnome-tetravex/F10-shortcut] Add F10 keyboard shortcut.



commit c24f253d81ae24fdc1e481cadc22e098bb3b0fc8
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Feb 19 21:35:52 2020 +0100

    Add F10 keyboard shortcut.

 src/gnome-tetravex.vala | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index eaa554e..0e86da5 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -125,7 +125,8 @@ private class Tetravex : Gtk.Application
         { "redo",           redo_cb         },
         { "size",           null,           "s",    "'2'",  size_changed    },
         { "help",           help_cb         },
-        { "about",          about_cb        }
+        { "about",          about_cb        },
+        { "hamburger",      hamburger_cb    }
     };
 
     private static int main (string[] args)
@@ -283,6 +284,7 @@ private class Tetravex : Gtk.Application
         set_accels_for_action ("app.move-right-r",  { "<Shift><Primary>Right"   });
         set_accels_for_action ("app.undo",          {        "<Primary>z"       });
         set_accels_for_action ("app.redo",          { "<Shift><Primary>z"       });
+        set_accels_for_action ("app.hamburger",     {                 "F10"     });
         // F1 and friends are managed manually
 
         Builder builder = new Builder.from_resource ("/org/gnome/Tetravex/gnome-tetravex.ui");
@@ -994,6 +996,11 @@ private class Tetravex : Gtk.Application
         return true;
     }
 
+    private void hamburger_cb ()
+    {
+        hamburger_button.active = !hamburger_button.active;
+    }
+
     private void help_cb ()
     {
         try


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