summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Bicha <jbicha@ubuntu.com>2018-12-05 12:46:13 -0500
committerShaun McCance <shaunm@fastmail.net>2019-01-16 14:28:10 +0000
commit41e3bb7675141a039c20cc136da412e3b36939c2 (patch)
tree7cadba27ee485cd4efcdeb6dc2ca73cae56219f0 /src
parent8ede92bc1b68ee38fde6528645c00f18fb4a43b0 (diff)
downloadyelp-41e3bb7675141a039c20cc136da412e3b36939c2.tar.gz
Stop using GNOME App Menu deprecated in 3.32
https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement Closes: https://gitlab.gnome.org/GNOME/yelp/issues/139
Diffstat (limited to 'src')
-rw-r--r--src/yelp-application.c13
-rw-r--r--src/yelp-window.c7
2 files changed, 7 insertions, 13 deletions
diff --git a/src/yelp-application.c b/src/yelp-application.c
index 47a69991..92bb9dec 100644
--- a/src/yelp-application.c
+++ b/src/yelp-application.c
@@ -264,7 +264,6 @@ yelp_application_startup (GApplication *application)
{
YelpApplication *app = YELP_APPLICATION (application);
YelpApplicationPrivate *priv = GET_PRIV (app);
- GMenu *menu, *section;
gchar *keyfile;
YelpSettings *settings;
@@ -315,18 +314,6 @@ yelp_application_startup (GApplication *application)
g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (priv->smaller_text_action));
application_set_font_sensitivity (app);
-
- menu = g_menu_new ();
- section = g_menu_new ();
- g_menu_append (section, _("New Window"), "win.yelp-window-new");
- g_menu_append_section (menu, NULL, G_MENU_MODEL (section));
- g_object_unref (section);
- section = g_menu_new ();
- g_menu_append (section, _("Larger Text"), "app.yelp-application-larger-text");
- g_menu_append (section, _("Smaller Text"), "app.yelp-application-smaller-text");
- g_menu_append_section (menu, NULL, G_MENU_MODEL (section));
- g_object_unref (section);
- gtk_application_set_app_menu (GTK_APPLICATION (application), G_MENU_MODEL (menu));
}
/******************************************************************************/
diff --git a/src/yelp-window.c b/src/yelp-window.c
index 6373918b..e5abd635 100644
--- a/src/yelp-window.c
+++ b/src/yelp-window.c
@@ -363,6 +363,7 @@ window_construct (YelpWindow *window)
menu = g_menu_new ();
section = g_menu_new ();
+ g_menu_append (section, _("New Window"), "win.yelp-window-new");
g_menu_append (section, _("Find…"), "win.yelp-window-find");
g_menu_append (section, _("Print…"), "win.yelp-view-print");
g_menu_append_section (menu, NULL, G_MENU_MODEL (section));
@@ -375,6 +376,12 @@ window_construct (YelpWindow *window)
g_object_unref (section);
section = g_menu_new ();
+ g_menu_append (section, _("Larger Text"), "app.yelp-application-larger-text");
+ g_menu_append (section, _("Smaller Text"), "app.yelp-application-smaller-text");
+ g_menu_append_section (menu, NULL, G_MENU_MODEL (section));
+ g_object_unref (section);
+
+ section = g_menu_new ();
g_menu_append (section, _("All Help"), "win.yelp-window-go-all");
g_menu_append_section (menu, NULL, G_MENU_MODEL (section));
g_object_unref (section);