~larsu/eog/add-disable-appmenu-patch

« back to all changes in this revision

Viewing changes to debian/patches/disable-appmenu-on-unity.patch

  • Committer: Lars Uebernickel
  • Date: 2014-03-11 10:34:45 UTC
  • Revision ID: lars.uebernickel@canonical.com-20140311103445-s532k4bhy9m4n3tl
Add disable-appmenu-on-unity.patch

Disables the application menu on platforms that show an app menu and a menubar
(such as unity). The menubar already contains all the actions of the appmenu.
Having both is redundant.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff --git a/src/eog-application.c b/src/eog-application.c
 
2
index a77157a..c4f899d 100644
 
3
--- a/src/eog-application.c
 
4
+++ b/src/eog-application.c
 
5
@@ -225,9 +225,19 @@ eog_application_init_app_menu (EogApplication *application)
 
6
 static void
 
7
 eog_application_startup (GApplication *application)
 
8
 {
 
9
+       gboolean shows_app_menu;
 
10
+       gboolean shows_menubar;
 
11
+
 
12
+       g_object_get (gtk_settings_get_default (),
 
13
+                     "gtk-shell-shows-app-menu", &shows_app_menu,
 
14
+                     "gtk-shell-shows-menubar", &shows_menubar,
 
15
+                     NULL);
 
16
+
 
17
+       if (shows_app_menu && !shows_menubar)
 
18
+               eog_application_init_app_menu (EOG_APPLICATION (application));
 
19
+
 
20
        G_APPLICATION_CLASS (eog_application_parent_class)->startup (application);
 
21
 
 
22
-       eog_application_init_app_menu (EOG_APPLICATION (application));
 
23
 }
 
24
 
 
25
 static void