diff options
author | Ryan Lortie <desrt@desrt.ca> | 2014-07-04 09:44:12 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2014-07-07 14:46:27 -0400 |
commit | 868ee07f492d60e87bcf4b4aa67b27de9e5ad4ea (patch) | |
tree | d640035c3e3e4b2aab202036635aa34bcdba49e4 /gtk/gtkapplication.h | |
parent | 59f3211b618bb55b3f0cb5cf4e22ad084248551d (diff) | |
download | gtk+-868ee07f492d60e87bcf4b4aa67b27de9e5ad4ea.tar.gz |
GtkApplication: use resources for loading menus
Use the new ::resource-base-path property on #GApplication to attempt to
load the menu layout of the application.
We look first at gtk/menus-appmenu.ui or gtk/menus-traditional.ui
depending on the setting of gtk_application_prefers_app_menu(). Failing
that, we fall back to the common case of gtk/menus.ui (which should
always be given). This provides a convenient way for application
authors to provide a different set of menus, depending on the desktop
environment they find themselves in.
As is the intention with other resources, if the resource base path is
unset, nothing will be loaded. Additionally, if the expected files are not
found, it is not an error -- just nothing happens.
https://bugzilla.gnome.org/show_bug.cgi?id=722092
Diffstat (limited to 'gtk/gtkapplication.h')
-rw-r--r-- | gtk/gtkapplication.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkapplication.h b/gtk/gtkapplication.h index 9d1af95e10..6fe1ff388c 100644 --- a/gtk/gtkapplication.h +++ b/gtk/gtkapplication.h @@ -154,6 +154,10 @@ void gtk_application_set_accels_for_action (GtkApplication GDK_AVAILABLE_IN_3_14 gboolean gtk_application_prefers_app_menu (GtkApplication *application); +GDK_AVAILABLE_IN_3_14 +GMenu * gtk_application_get_menu_by_id (GtkApplication *application, + const gchar *id); + G_END_DECLS #endif /* __GTK_APPLICATION_H__ */ |