[gthumb] install the app menu only if there's the gnome-shell showing it



commit cacddf8fd37514422548e83e13c8e6d6c74f48a1
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Sep 15 10:21:11 2012 +0200

    install the app menu only if there's the gnome-shell showing it

 gthumb/main.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/main.c b/gthumb/main.c
index 2c62b6a..9750d0b 100644
--- a/gthumb/main.c
+++ b/gthumb/main.c
@@ -400,9 +400,16 @@ static const GActionEntry app_menu_entries[] = {
 static void
 _gth_application_initialize_app_menu (GApplication *application)
 {
+	gboolean    show_app_menu;
 	GtkBuilder *builder;
 	GError     *error = NULL;
 
+	g_object_get (gtk_settings_get_default (),
+		      "gtk-shell-shows-app-menu", &show_app_menu,
+		      NULL);
+	if (! show_app_menu)
+		return;
+
 	g_action_map_add_action_entries (G_ACTION_MAP (application),
 					 app_menu_entries,
 					 G_N_ELEMENTS (app_menu_entries),



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