[devhelp] amtk: use amtk_action_info_store_set_all_accels_to_app()



commit 7657544cae7c75a517eff11819cdebef35f50bec
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Apr 13 16:36:39 2018 +0200

    amtk: use amtk_action_info_store_set_all_accels_to_app()

 src/dh-app.c    |    5 ++++-
 src/dh-window.c |    4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/dh-app.c b/src/dh-app.c
index ffe5b48..acdd633 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -81,6 +81,9 @@ add_action_infos (DhApp *app)
         accels[1] = "<Control>equal";
         action_info = amtk_action_info_store_lookup (app->priv->action_info_store, "win.zoom-in");
         amtk_action_info_set_accels (action_info, accels);
+
+        amtk_action_info_store_set_all_accels_to_app (app->priv->action_info_store,
+                                                      GTK_APPLICATION (app));
 }
 
 static DhAssistant *
@@ -389,7 +392,7 @@ create_app_menu_if_needed (GtkApplication *app)
                 return;
 
         app_menu = g_menu_new ();
-        factory = amtk_factory_new (app);
+        factory = amtk_factory_new (NULL);
 
         section = g_menu_new ();
         amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.new-window"));
diff --git a/src/dh-window.c b/src/dh-window.c
index c56aeb9..664870e 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -465,7 +465,7 @@ create_window_menu_simple (void)
         AmtkFactory *factory;
 
         menu = g_menu_new ();
-        factory = amtk_factory_new_with_default_application ();
+        factory = amtk_factory_new (NULL);
 
         section = g_menu_new ();
         amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.show-sidebar"));
@@ -496,7 +496,7 @@ create_window_menu_plus_app_menu (void)
         AmtkFactory *factory;
 
         menu = g_menu_new ();
-        factory = amtk_factory_new_with_default_application ();
+        factory = amtk_factory_new (NULL);
 
         section = g_menu_new ();
         amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.new-window"));


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