Merge lp:~larsu/eog/add-disable-appmenu-patch into lp:~ubuntu-desktop/eog/ubuntu

Proposed by Lars Karlitski
Status: Merged
Merged at revision: 147
Proposed branch: lp:~larsu/eog/add-disable-appmenu-patch
Merge into: lp:~ubuntu-desktop/eog/ubuntu
Diff against target: 43 lines (+31/-0)
2 files modified
debian/patches/disable-appmenu-on-unity.patch (+30/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~larsu/eog/add-disable-appmenu-patch
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
VCS imports Pending
Review via email: mp+210377@code.launchpad.net

This proposal supersedes a proposal from 2014-03-11.

Description of the change

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.

To post a comment you must log in.
148. By Lars Karlitski

disable-appmenu patch: add header

Revision history for this message
Sebastien Bacher (seb128) wrote :

That looks good, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'debian/patches/disable-appmenu-on-unity.patch'
--- debian/patches/disable-appmenu-on-unity.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/disable-appmenu-on-unity.patch 2014-03-11 10:45:12 +0000
@@ -0,0 +1,30 @@
1Description: Disables the application menu on platforms that show an app menu
2 and a menubar (such as unity). The menubar already contains all the actions of
3 the appmenu. Having both is redundant.
4Forwarded: doesn't make sense upstream until eog is ported to GMenuModel
5Author: Lars Uebernickel <lars.uebernickel@canonical.com>
6diff --git a/src/eog-application.c b/src/eog-application.c
7index a77157a..c4f899d 100644
8--- a/src/eog-application.c
9+++ b/src/eog-application.c
10@@ -225,9 +225,19 @@ eog_application_init_app_menu (EogApplication *application)
11 static void
12 eog_application_startup (GApplication *application)
13 {
14+ gboolean shows_app_menu;
15+ gboolean shows_menubar;
16+
17+ g_object_get (gtk_settings_get_default (),
18+ "gtk-shell-shows-app-menu", &shows_app_menu,
19+ "gtk-shell-shows-menubar", &shows_menubar,
20+ NULL);
21+
22+ if (shows_app_menu && !shows_menubar)
23+ eog_application_init_app_menu (EOG_APPLICATION (application));
24+
25 G_APPLICATION_CLASS (eog_application_parent_class)->startup (application);
26
27- eog_application_init_app_menu (EOG_APPLICATION (application));
28 }
29
30 static void
031
=== modified file 'debian/patches/series'
--- debian/patches/series 2014-03-10 18:17:44 +0000
+++ debian/patches/series 2014-03-11 10:45:12 +0000
@@ -2,3 +2,4 @@
203_unity_control_center.patch203_unity_control_center.patch
3git_dialog_dont_lock.patch3git_dialog_dont_lock.patch
4git_icc_color.patch4git_icc_color.patch
5disable-appmenu-on-unity.patch

Subscribers

People subscribed via source and target branches

to all changes: