1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-04 20:07:36 +00:00

main-window: Use menu model for app menu popover

https://docs.gtk.org/gtk4/migrating-3to4.html#gtkmenu-gtkmenubar-and-gtkmenuitem-are-gone

Unclear why the invisible entries for `Keyboard shortcuts` and `Help`
are there. I've left them ported but commented out for now.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
This commit is contained in:
Anton Lazarev 2023-12-17 23:21:40 -08:00
parent b32faf39f8
commit 2ee3f347ce

View file

@ -158,46 +158,28 @@
</child>
</object>
<object class="GtkPopoverMenu" id="menu_popover">
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="spacing">6</property>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text" translatable="yes">_VoIP Accounts</property>
<property name="action-name">app.accounts</property>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">False</property>
<property name="text" translatable="yes">_Keyboard shortcuts</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">False</property>
<property name="text" translatable="yes">_Help</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="text" translatable="yes" comments="&quot;Calls&quot; is the application name, do not translate">_About Calls</property>
<property name="action-name">win.about</property>
</object>
</child>
</object>
</property>
<property name="menu-model">app-menu</property>
</object>
<menu id="app-menu">
<section>
<item>
<attribute name="label" translatable="yes">_VoIP Accounts</attribute>
<attribute name="action">app.accounts</attribute>
</item>
</section>
<section>
<!--item>
<attribute name="label" translatable="yes">_Keyboard shortcuts</attribute>
<attribute name="action"></attribute>
</item-->
<!--item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="action"></attribute>
</item-->
<item>
<attribute name="label" translatable="yes" comments="&quot;Calls&quot; is the application name, do not translate">_About Calls</attribute>
<attribute name="action">win.about</attribute>
</item>
</section>
</menu>
</interface>