aboutsummaryrefslogtreecommitdiff
path: root/src/colloquium.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2018-03-31 18:03:28 +0200
committerThomas White <taw@bitwiz.me.uk>2018-03-31 18:06:36 +0200
commitd8ab381ea63e90053c958a7658d421f6843a8783 (patch)
tree0d812eaf1465bb38638c51a0003eb175218df218 /src/colloquium.c
parent3f1596874a2790fc513e2fed319e416285659180 (diff)
Use gtk_application_prefers_app_menu
Diffstat (limited to 'src/colloquium.c')
-rw-r--r--src/colloquium.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/colloquium.c b/src/colloquium.c
index bcd3d92..3e49535 100644
--- a/src/colloquium.c
+++ b/src/colloquium.c
@@ -319,8 +319,6 @@ static void colloquium_startup(GApplication *papp)
{
Colloquium *app = COLLOQUIUM(papp);
GtkBuilder *builder;
- GtkSettings *settings;
- gboolean app_menu_shown;
const char *configdir;
char *tmp;
@@ -529,14 +527,13 @@ static void colloquium_startup(GApplication *papp)
gtk_application_set_menubar(GTK_APPLICATION(app),
G_MENU_MODEL(gtk_builder_get_object(builder, "menubar")));
- settings = gtk_settings_get_for_screen(gdk_screen_get_default());
- g_object_get(G_OBJECT(settings), "gtk-shell-shows-app-menu", &app_menu_shown, NULL);
- if ( app_menu_shown ) {
+ if ( gtk_application_prefers_app_menu(GTK_APPLICATION(app)) ) {
/* Set the application menu only if it will be shown by the
* desktop environment. All the entries are already in the
* normal menus, so don't let GTK create a fallback menu in the
* menu bar. */
GMenuModel *mmodel = G_MENU_MODEL(gtk_builder_get_object(builder, "app-menu"));
+ printf("Using app menu\n");
gtk_application_set_app_menu(GTK_APPLICATION(app), mmodel);
}
g_object_unref(builder);