[gnome-logs] Remove app menu



commit 4185fe30503c80943e3b1825967af5b0290958b8
Author: Jonathan Kang <jonathankang gnome org>
Date:   Wed Oct 10 17:09:01 2018 +0800

    Remove app menu
    
    https://wiki.gnome.org/Initiatives/GnomeGoals/AppMenuRetirement
    https://gitlab.gnome.org/GNOME/Initiatives/issues/4

 data/gl-eventtoolbar.ui           | 49 +++++++++++++++++++++++++++++++++++++++
 data/menus.ui                     | 31 -------------------------
 data/org.gnome.Logs.gresource.xml |  1 -
 po/POTFILES.in                    |  1 -
 4 files changed, 49 insertions(+), 33 deletions(-)
---
diff --git a/data/gl-eventtoolbar.ui b/data/gl-eventtoolbar.ui
index bb7983c..b9c64c6 100644
--- a/data/gl-eventtoolbar.ui
+++ b/data/gl-eventtoolbar.ui
@@ -1,8 +1,57 @@
 <interface domain="gnome-logs">
+    <menu id='primary-menu'>
+        <section>
+            <item>
+                <attribute name="accel">&lt;Primary&gt;n</attribute>
+                <attribute name="label" translatable="yes">_New Window</attribute>
+                <attribute name="action">app.new-window</attribute>
+            </item>
+        </section>
+        <section>
+            <item>
+                <attribute name="accel">F1</attribute>
+                <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">win.show-help-overlay</attribute>
+            </item>
+            <item>
+                <attribute name="label" translatable="yes">_About</attribute>
+                <attribute name="action">app.about</attribute>
+            </item>
+            <item>
+                <attribute name="accel">&lt;Primary&gt;q</attribute>
+                <attribute name="label" translatable="yes">_Quit</attribute>
+                <attribute name="action">app.quit</attribute>
+            </item>
+        </section>
+    </menu>
     <template class="GlEventToolbar" parent="GtkHeaderBar">
         <property name="expand">True</property>
         <property name="show-close-button">True</property>
         <property name="visible">True</property>
+        <child>
+            <object class="GtkMenuButton" id="main_menu">
+                <property name="valign">center</property>
+                <property name="visible">True</property>
+                <property name="menu_model">primary-menu</property>
+                <style>
+                    <class name="image-button" />
+                </style>
+                <child>
+                    <object class="GtkImage">
+                        <property name="icon-name">open-menu-symbolic</property>
+                        <property name="icon-size">1</property>
+                        <property name="visible">True</property>
+                    </object>
+                </child>
+            </object>
+            <packing>
+                <property name="pack-type">end</property>
+            </packing>
+        </child>
         <child>
             <object class="GtkButton" id="output_button">
                 <property name="action-name">win.export</property>
diff --git a/data/org.gnome.Logs.gresource.xml b/data/org.gnome.Logs.gresource.xml
index 31dde3c..fcaf443 100644
--- a/data/org.gnome.Logs.gresource.xml
+++ b/data/org.gnome.Logs.gresource.xml
@@ -11,6 +11,5 @@
   </gresource>
   <gresource prefix='/org/gnome/Logs/gtk'>
     <file preprocess='xml-stripblanks'>help-overlay.ui</file>
-    <file preprocess='xml-stripblanks'>menus.ui</file>
   </gresource>
 </gresources>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1208ce6..f2bffc6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -7,7 +7,6 @@ data/gl-eventviewlist.ui
 data/gl-searchpopover.ui
 data/gl-window.ui
 data/help-overlay.ui
-data/menus.ui
 data/org.gnome.Logs.appdata.xml.in
 data/org.gnome.Logs.desktop.in
 data/org.gnome.Logs.gschema.xml


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