[yelp] Stop using GNOME App Menu deprecated in 3.32
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] Stop using GNOME App Menu deprecated in 3.32
- Date: Wed, 16 Jan 2019 14:28:47 +0000 (UTC)
commit 41e3bb7675141a039c20cc136da412e3b36939c2
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Wed Dec 5 12:46:13 2018 -0500
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
src/yelp-application.c | 13 -------------
src/yelp-window.c | 7 +++++++
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));
@@ -374,6 +375,12 @@ window_construct (YelpWindow *window)
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);
+
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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]