[gnome-dictionary: 1/2] menus: Update for GNOME 3.32 recommendations



commit 8e2cd8b714875121df610fc0d07e7dee534a7ba9
Author: Jeremy Bicha <jbicha ubuntu com>
Date:   Thu Dec 6 18:49:31 2018 -0500

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

 src/gdict-app-menus.ui | 42 ++++++++++++++++--------------------------
 src/gdict-window.c     |  2 +-
 2 files changed, 17 insertions(+), 27 deletions(-)
---
diff --git a/src/gdict-app-menus.ui b/src/gdict-app-menus.ui
index f5db26a..e8b6107 100644
--- a/src/gdict-app-menus.ui
+++ b/src/gdict-app-menus.ui
@@ -1,5 +1,5 @@
 <interface>
-  <menu id="app-menu">
+  <menu id="primary-menu">
     <section>
       <item>
         <attribute name="label" translatable="yes">_New Window</attribute>
@@ -7,31 +7,6 @@
         <attribute name="accel">&lt;Primary&gt;n</attribute>
       </item>
     </section>
-    <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</attribute>
-        <attribute name="action">app.about</attribute>
-      </item>
-      <item>
-        <attribute name="label" translatable="yes">_Quit</attribute>
-        <attribute name="action">app.quit</attribute>
-       <attribute name="accel">&lt;Primary&gt;Q</attribute>
-      </item>
-    </section>
-  </menu>
-
-  <menu id="popup">
     <section>
       <item>
         <attribute name="label" translatable="yes">_Save a Copy…</attribute>
@@ -113,5 +88,20 @@
         </section>
       </submenu>
     </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">Pr_eferences</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 Dictionary</attribute>
+        <attribute name="action">app.about</attribute>
+      </item>
+    </section>
   </menu>
 </interface>
diff --git a/src/gdict-window.c b/src/gdict-window.c
index 4487ebe..a3f13ae 100644
--- a/src/gdict-window.c
+++ b/src/gdict-window.c
@@ -1350,7 +1350,7 @@ gdict_window_constructed (GObject *gobject)
    * the constructed() vfunc, so we need to use the global singleton
    */
   app = g_application_get_default ();
-  menu = gtk_application_get_menu_by_id (GTK_APPLICATION (app), "popup");
+  menu = gtk_application_get_menu_by_id (GTK_APPLICATION (app), "primary-menu");
   button = gtk_menu_button_new ();
   gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), G_MENU_MODEL (menu));
   gtk_menu_button_set_direction (GTK_MENU_BUTTON (button), GTK_ARROW_NONE);


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