app-menu: move to using window menu instead of app-menu

This starts moving things towards our 3.32 goals of using window menus
intead of the app-menu.
This commit is contained in:
Christian Hergert
2018-09-24 20:55:20 -07:00
parent 1584fca77a
commit bf1472b009
3 changed files with 42 additions and 38 deletions

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<interface>
<menu id="app-menu">
<section id="app-menu-new-section">
<item>
<attribute name="label" translatable="yes">_New Window</attribute>
<attribute name="action">app.new-window</attribute>
</item>
</section>
<section id="app-menu-open-section">
<item>
<attribute name="label" translatable="yes">_Open Capture</attribute>
<attribute name="action">app.open-capture</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">About</attribute>
<attribute name="action">app.about</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Help</attribute>
<attribute name="action">app.help</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
<attribute name="action">app.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="action">app.quit</attribute>
</item>
</section>
</menu>
</interface>

View File

@ -2,7 +2,6 @@
<gresources>
<gresource prefix="/org/gnome/sysprof">
<!-- Automatic GTK resources -->
<file>gtk/menus.ui</file>
<file>gtk/help-overlay.ui</file>
<!-- Theme overrides -->

View File

@ -261,17 +261,30 @@
<property name="visible">true</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="action-name">app.new-window</property>
<property name="text" translatable="yes">New Window</property>
<property name="visible">true</property>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="orientation">horizontal</property>
<property name="visible">true</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="action-name">win.open-capture</property>
<property name="text" translatable="yes">Open</property>
<property name="text" translatable="yes">Open Capture…</property>
<property name="visible">true</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="action-name">win.save-capture</property>
<property name="text" translatable="yes">Save As</property>
<property name="text" translatable="yes">Save As</property>
<property name="visible">true</property>
</object>
</child>
@ -301,6 +314,33 @@
<property name="visible">true</property>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="orientation">horizontal</property>
<property name="visible">true</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="action-name">app.show-help-overlay</property>
<property name="text" translatable="yes">Keyboard Shortcuts</property>
<property name="visible">true</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="action-name">app.help</property>
<property name="text" translatable="yes">Help</property>
<property name="visible">true</property>
</object>
</child>
<child>
<object class="GtkModelButton">
<property name="action-name">app.about</property>
<property name="text" translatable="yes">About Sysprof</property>
<property name="visible">true</property>
</object>
</child>
</object>
</child>
</object>