Merge lp:~larsu/evince/lp1312179 into lp:~ubuntu-desktop/evince/ubuntu

Proposed by Lars Karlitski
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 242
Merged at revision: 243
Proposed branch: lp:~larsu/evince/lp1312179
Merge into: lp:~ubuntu-desktop/evince/ubuntu
Diff against target: 54 lines (+20/-13)
1 file modified
debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch (+20/-13)
To merge this branch: bzr merge lp:~larsu/evince/lp1312179
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
VCS imports Pending
Review via email: mp+217615@code.launchpad.net

This proposal supersedes a proposal from 2014-04-29.

Description of the change

menu patch: allow detailed action names in the set_accels_for_action case

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch'
--- debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch 2014-02-10 17:43:04 +0000
+++ debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch 2014-04-29 14:20:41 +0000
@@ -14,23 +14,33 @@
14 shell/menus.ui | 22 ++++++++++++++++++++++14 shell/menus.ui | 22 ++++++++++++++++++++++
15 2 files changed, 23 insertions(+), 1 deletion(-)15 2 files changed, 23 insertions(+), 1 deletion(-)
1616
17diff --git a/shell/ev-application.c b/shell/ev-application.c17Index: evince-3.10.3/shell/ev-application.c
18index e2d87af..2c4b7b3 10064418===================================================================
19--- a/shell/ev-application.c19--- evince-3.10.3.orig/shell/ev-application.c 2014-04-29 16:09:07.319931409 +0200
20+++ b/shell/ev-application.c20+++ evince-3.10.3/shell/ev-application.c 2014-04-29 16:09:33.031931585 +0200
21@@ -1176,7 +1176,7 @@ ev_application_startup (GApplication *gapplication)21@@ -1193,7 +1193,17 @@
22 it = action_accels;22 it = action_accels;
23 while (it[0])23 while (it[0])
24 {24 {
25- gtk_application_set_accels_for_action (GTK_APPLICATION (application), it[0], &it[1]);25- gtk_application_set_accels_for_action (GTK_APPLICATION (application), it[0], &it[1]);
26+ gtk_application_add_accelerator (GTK_APPLICATION (application), it[1], it[0], NULL);26+ gchar *action;
27+ GVariant *target;
28+
29+ if (g_action_parse_detailed_name (it[0], &action, &target, NULL))
30+ {
31+ gtk_application_add_accelerator (GTK_APPLICATION (application), it[1], action, target);
32+
33+ g_free (action);
34+ if (target)
35+ g_variant_unref (target);
36+ }
27 it += g_strv_length ((gchar **) it) + 1;37 it += g_strv_length ((gchar **) it) + 1;
28 }38 }
29 }39 }
30diff --git a/shell/menus.ui b/shell/menus.ui40Index: evince-3.10.3/shell/menus.ui
31index c3006f8..1d9a32e 10064441===================================================================
32--- a/shell/menus.ui42--- evince-3.10.3.orig/shell/menus.ui 2014-04-29 16:09:07.319931409 +0200
33+++ b/shell/menus.ui43+++ evince-3.10.3/shell/menus.ui 2014-04-29 16:09:07.311931409 +0200
34@@ -23,6 +23,7 @@44@@ -23,6 +23,7 @@
35 <item>45 <item>
36 <attribute name="label" translatable="yes">_Open</attribute>46 <attribute name="label" translatable="yes">_Open</attribute>
@@ -181,6 +191,3 @@
181 </item>191 </item>
182 </section>192 </section>
183 <section>193 <section>
184--
1851.9.rc1
186

Subscribers

People subscribed via source and target branches

to all changes: