[five-or-more] Retire appmenu (#10)



commit 856d6571cb2fc44b1078f29945f74a99970a491a
Author: Robert Roth <robert roth off gmail com>
Date:   Sun Oct 7 00:12:35 2018 +0300

    Retire appmenu (#10)
    
    Changed About menu item to About Five or More
    Removed Quit menu item
    Moved appmenu to primary menu in-window with hamburger icon
    Pu preferences, help and about items in a single group

 data/five-or-more-menu.ui                 | 32 -----------------------
 data/five-or-more.ui                      | 42 ++++++++++++++++++++++++++++++-
 data/meson.build                          |  2 +-
 data/org.gnome.five-or-more.gresource.xml |  3 ---
 4 files changed, 42 insertions(+), 37 deletions(-)
---
diff --git a/data/five-or-more.ui b/data/five-or-more.ui
index afc3c79..4118283 100644
--- a/data/five-or-more.ui
+++ b/data/five-or-more.ui
@@ -1,6 +1,29 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires gtk+ 3.10 -->
+  <menu id="primary-menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">Scores</attribute>
+        <attribute name="action">app.scores</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">Preferences</attribute>
+        <attribute name="action">app.preferences</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">Help</attribute>
+        <attribute name="action">app.help</attribute>
+        <attribute name="accel">F1</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">About Five or More</attribute>
+        <attribute name="action">app.about</attribute>
+      </item>
+    </section>
+  </menu>
   <object class="GtkAccelGroup" id="accelgroup"/>
   <template class="GameWindow" parent="GtkApplicationWindow">
     <property name="can_focus">False</property>
@@ -39,6 +62,23 @@
             </child>
           </object>
         </child>
+        <child>
+          <object class="GtkMenuButton" id="primary-menu-button">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="menu_model">primary-menu</property>
+            <child>
+              <object class="GtkImage" id="primary-menu-button-image">
+                <property name="visible">True</property>
+                <property name="icon_size">1</property>
+                <property name="icon_name">open-menu-symbolic</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkLabel" id="scorelabel">
             <property name="visible">True</property>
diff --git a/data/meson.build b/data/meson.build
index 825c99e..52ffc59 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -16,7 +16,7 @@ foreach file: ['balls.svg', 'shapes.svg', 'tango.svg']
 endforeach
 
 # UI files
-foreach file: ['five-or-more.ui', 'five-or-more-preferences.ui', 'five-or-more-menu.ui']
+foreach file: ['five-or-more.ui', 'five-or-more-preferences.ui']
   install_data (file,
     install_dir: join_paths (pkgdata_dir)
   )
diff --git a/data/org.gnome.five-or-more.gresource.xml b/data/org.gnome.five-or-more.gresource.xml
index 9ee751c..4893213 100644
--- a/data/org.gnome.five-or-more.gresource.xml
+++ b/data/org.gnome.five-or-more.gresource.xml
@@ -4,7 +4,4 @@
     <file preprocess="xml-stripblanks">five-or-more.ui</file>
     <file preprocess="xml-stripblanks" alias="preferences-dialog.ui">five-or-more-preferences.ui</file>
   </gresource>
-  <gresource prefix="/org/gnome/five-or-more/gtk">
-    <file preprocess="xml-stripblanks" alias="menus.ui">five-or-more-menu.ui</file>
-  </gresource>
 </gresources>


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