diff options
author | Jeremy Bicha <jbicha@ubuntu.com> | 2018-12-06 18:49:31 -0500 |
---|---|---|
committer | Jeremy Bicha <jbicha@ubuntu.com> | 2018-12-06 18:59:40 -0500 |
commit | 8e2cd8b714875121df610fc0d07e7dee534a7ba9 (patch) | |
tree | 955a01acb6cc1ca3f440693361d86a880f55ce8f | |
parent | b97ca1470bd295525317f4a6d25a67bce009959d (diff) | |
download | gnome-dictionary-8e2cd8b714875121df610fc0d07e7dee534a7ba9.tar.gz |
menus: Update for GNOME 3.32 recommendations
https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
-rw-r--r-- | src/gdict-app-menus.ui | 42 | ||||
-rw-r--r-- | 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> @@ -9,31 +9,6 @@ </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"><Primary>Q</attribute> - </item> - </section> - </menu> - - <menu id="popup"> - <section> - <item> <attribute name="label" translatable="yes">_Save a Copy…</attribute> <attribute name="action">win.save-as</attribute> </item> @@ -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); |