main: Reimplement primary menu accellerator as a shortcut

In GTK4, the replacement to accelerators like this are shortcut
controllers.

Add a global shortcut controller to the primary menu button, and
bind it to F10.
This commit is contained in:
Georges Basile Stavracas Neto 2022-07-15 20:02:01 -03:00
parent 6fc250d5cf
commit 58fc4e0a5b
1 changed files with 11 additions and 1 deletions

View File

@ -22,10 +22,20 @@
<property name="direction">none</property>
<property name="use-popover">True</property>
<property name="menu-model">primary-menu</property>
<accelerator key="F10" signal="activate"/>
<style>
<class name="image-button"/>
</style>
<child>
<object class="GtkShortcutController">
<property name="scope">global</property>
<child>
<object class="GtkShortcut">
<property name="trigger">F10</property>
<property name="action">activate</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>