[gnome-chess/arnaudb/wip/gtk4: 22/27] Use ShortcutController.




commit 40b8032e0639d25ee914454f1e466a754f58e483
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Apr 23 11:45:46 2020 +0200

    Use ShortcutController.

 data/gnome-chess.ui | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/data/gnome-chess.ui b/data/gnome-chess.ui
index 8edac83..fbadf6e 100644
--- a/data/gnome-chess.ui
+++ b/data/gnome-chess.ui
@@ -95,8 +95,18 @@
           <object class="GtkMenuButton">
             <property name="can-focus">True</property>
             <property name="menu-model">app-menu</property>
-            <accelerator key="F10" signal="activate"/>
             <property name="icon-name">open-menu-symbolic</property>
+            <child>
+              <object class='GtkShortcutController'>
+                <property name='scope'>managed</property>
+                <child>
+                  <object class='GtkShortcut'>
+                    <property name='trigger'>F10</property>
+                    <property name='action'>activate</property>
+                  </object>
+                </child>
+              </object>
+            </child>
           </object>
         </child>
       </object>


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