[gnome-chess] menus: Update for GNOME 3.32 recommendations



commit c5aa0a303c5ad177093f3a00823e35b0dbac0cbd
Author: Jeremy Bicha <jbicha ubuntu com>
Date:   Thu Dec 6 12:56:41 2018 -0500

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

 data/gnome-chess.ui     | 37 +++++++++++++++++++++++++++++++++++++
 data/menu.ui            | 28 ----------------------------
 po/POTFILES.in          |  1 -
 src/chess.gresource.xml |  3 ---
 4 files changed, 37 insertions(+), 32 deletions(-)
---
diff --git a/data/gnome-chess.ui b/data/gnome-chess.ui
index cdb941d..4bb81f7 100644
--- a/data/gnome-chess.ui
+++ b/data/gnome-chess.ui
@@ -1,6 +1,25 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.10 -->
+  <menu id="app-menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">Preferences</attribute>
+        <attribute name="action">app.preferences</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 Chess</attribute>
+        <attribute name="action">app.about</attribute>
+      </item>
+    </section>
+  </menu>
   <object class="GtkListStore" id="history_model">
     <columns>
       <!-- column-name label -->
@@ -130,6 +149,24 @@
             <property name="pack_type">end</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkMenuButton" id="menu_button">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="menu-model">app-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 d8fc1fd..fd7b2da 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,7 +3,6 @@
 data/gnome-chess.appdata.xml.in
 data/gnome-chess.desktop.in
 data/gnome-chess.ui
-data/menu.ui
 data/org.gnome.chess.gschema.xml
 data/preferences.ui
 data/promotion-type-selector.ui
diff --git a/src/chess.gresource.xml b/src/chess.gresource.xml
index 57c6bb9..a07423a 100644
--- a/src/chess.gresource.xml
+++ b/src/chess.gresource.xml
@@ -5,8 +5,5 @@
     <file preprocess="xml-stripblanks" alias="preferences.ui">../data/preferences.ui</file>
     <file preprocess="xml-stripblanks" 
alias="promotion-type-selector.ui">../data/promotion-type-selector.ui</file>
   </gresource>
-  <gresource prefix="/org/gnome/chess/gtk">
-    <file preprocess="xml-stripblanks" alias="menus.ui">../data/menu.ui</file>
-  </gresource>
 </gresources>
 


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