[iagno: 1/2] menus: Update for GNOME 3.32 recommendations



commit 2ab362b849dc2dd4986315ddf369b85b5122ba56
Author: Jeremy Bicha <jbicha ubuntu com>
Date:   Thu Dec 6 11:37:48 2018 -0500

    menus: Update for GNOME 3.32 recommendations
    
    https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement

 data/Makefile.am        |  1 -
 data/iagno-menus.ui     | 32 --------------------------------
 data/iagno.ui           | 41 +++++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in          |  1 -
 src/iagno.gresource.xml |  3 ---
 5 files changed, 41 insertions(+), 37 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 8ac5a1d..d6aa8a1 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -5,7 +5,6 @@ SUBDIRS = \
 dist_noinst_DATA = \
        iagno-screens.ui \
        iagno-themes.ui \
-       iagno-menus.ui \
        iagno.ui \
        iagno.css
 
diff --git a/data/iagno.ui b/data/iagno.ui
index 2d01a24..0af3dde 100644
--- a/data/iagno.ui
+++ b/data/iagno.ui
@@ -1,6 +1,29 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="3.12"/>
+  <menu id="primary-menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">A_ppearance</attribute>
+        <attribute name="action">app.theme</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Sound</attribute>
+        <attribute name="action">app.sound</attribute>
+      </item>
+    </section>
+    <section>
+      <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 Iagno</attribute>
+        <attribute name="action">app.about</attribute>
+      </item>
+    </section>
+  </menu>
   <template class="GameWindow" parent="GtkApplicationWindow">
     <!-- <initial-focus name="view"/> -->
     <child type="titlebar">
@@ -31,6 +54,24 @@
             </child>
           </object>
         </child>
+        <child>
+          <object class="GtkMenuButton" id="menu_button">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="menu-model">primary-menu</property>
+            <child>
+              <object class="GtkImage">
+                <property name="visible">True</property>
+                <property name="icon_name">open-menu-symbolic</property>
+                <property name="icon_size">1</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
       </object>
     </child>
     <child>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b3987a1..f2ec6ff 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,7 +2,6 @@
 # Please keep this file in alphabetical order.
 data/iagno.appdata.xml.in
 data/iagno.desktop.in
-data/iagno-menus.ui
 data/iagno-screens.ui
 data/iagno-themes.ui
 data/iagno.ui
diff --git a/src/iagno.gresource.xml b/src/iagno.gresource.xml
index dd0a6e4..c36a3e9 100644
--- a/src/iagno.gresource.xml
+++ b/src/iagno.gresource.xml
@@ -6,7 +6,4 @@
     <file preprocess="xml-stripblanks" alias="iagno-screens.ui">../data/iagno-screens.ui</file>
     <file alias="iagno.css">../data/iagno.css</file>
   </gresource>
-  <gresource prefix="/org/gnome/iagno/gtk">
-    <file preprocess="xml-stripblanks" alias="menus.ui">../data/iagno-menus.ui</file>
-  </gresource>
 </gresources>


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