Merge lp:~larsu/evince/drop-gtk-310-hacks into lp:~ubuntu-desktop/evince/ubuntu

Proposed by Lars Karlitski
Status: Rejected
Rejected by: Sebastien Bacher
Proposed branch: lp:~larsu/evince/drop-gtk-310-hacks
Merge into: lp:~ubuntu-desktop/evince/ubuntu
Diff against target: 314 lines (+8/-281)
4 files modified
debian/changelog (+8/-0)
debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch (+0/-193)
debian/patches/gtk310-secondary-keybindings.patch (+0/-86)
debian/patches/series (+0/-2)
To merge this branch: bzr merge lp:~larsu/evince/drop-gtk-310-hacks
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+226786@code.launchpad.net

Commit message

* debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch,
  debian/patches/gtk310-secondary-keybindings.patch:
  - drop those patches as gtk 3.12 doesn't need those hacks anymore

Description of the change

* debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch,
  debian/patches/gtk310-secondary-keybindings.patch:
  - drop those patches as gtk 3.12 doesn't need those hacks anymore

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

Thanks, we update evince to 3.13 which included cleaning out those changes

review: Approve

Unmerged revisions

247. By Lars Karlitski

* debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch,
  debian/patches/gtk310-secondary-keybindings.patch:
  - drop those patches as gtk 3.12 doesn't need those hacks anymore

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2014-06-06 19:05:36 +0000
+++ debian/changelog 2014-07-15 08:15:31 +0000
@@ -1,3 +1,11 @@
1evince (3.10.3-0ubuntu14) UNRELEASED; urgency=medium
2
3 * debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch,
4 debian/patches/gtk310-secondary-keybindings.patch:
5 - drop those patches as gtk 3.12 doesn't need those hacks anymore
6
7 -- Lars Uebernickel <lars.uebernickel@ubuntu.com> Tue, 15 Jul 2014 10:04:45 +0200
8
1evince (3.10.3-0ubuntu13) utopic; urgency=medium9evince (3.10.3-0ubuntu13) utopic; urgency=medium
210
3 * debian/apparmor-profile.abstraction: allow rw to ~/.config/evince11 * debian/apparmor-profile.abstraction: allow rw to ~/.config/evince
412
=== removed 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-04-29 14:12:21 +0000
+++ debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch 1970-01-01 00:00:00 +0000
@@ -1,193 +0,0 @@
1From 6781213261c36f4f6c417b06da630a49484faab4 Mon Sep 17 00:00:00 2001
2From: Lars Uebernickel <lars.uebernickel@canonical.com>
3Date: Mon, 10 Feb 2014 18:13:56 +0100
4Subject: [PATCH] Don't use gtk_application_set_accels_for_action()
5
6Gtk 3.10 doesn't have this function. Change that to use
7gtk_application_add_accelerator. Also add the accelerators to menus.xml
8so that they show up in the UI. (It should be enough to only add them to
9menus.xml, but gtk doesn't seem to pick those up. It's not worth fixing
10that bug as the accelerator handling is revamped in 3.12 and the this
11workaround works fine.)
12---
13 shell/ev-application.c | 2 +-
14 shell/menus.ui | 22 ++++++++++++++++++++++
15 2 files changed, 23 insertions(+), 1 deletion(-)
16
17Index: evince-3.10.3/shell/ev-application.c
18===================================================================
19--- evince-3.10.3.orig/shell/ev-application.c 2014-04-29 16:09:07.319931409 +0200
20+++ evince-3.10.3/shell/ev-application.c 2014-04-29 16:09:33.031931585 +0200
21@@ -1193,7 +1193,17 @@
22 it = action_accels;
23 while (it[0])
24 {
25- gtk_application_set_accels_for_action (GTK_APPLICATION (application), it[0], &it[1]);
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+ }
37 it += g_strv_length ((gchar **) it) + 1;
38 }
39 }
40Index: evince-3.10.3/shell/menus.ui
41===================================================================
42--- evince-3.10.3.orig/shell/menus.ui 2014-04-29 16:09:07.319931409 +0200
43+++ evince-3.10.3/shell/menus.ui 2014-04-29 16:09:07.311931409 +0200
44@@ -23,6 +23,7 @@
45 <item>
46 <attribute name="label" translatable="yes">_Open</attribute>
47 <attribute name="action">app.open</attribute>
48+ <attribute name="accel">&lt;Ctrl&gt;O</attribute>
49 </item>
50 </section>
51 <section>
52@@ -33,6 +34,7 @@
53 <item>
54 <attribute name="label" translatable="yes">_Help</attribute>
55 <attribute name="action">app.help</attribute>
56+ <attribute name="accel">F1</attribute>
57 </item>
58 </section>
59 </menu>
60@@ -52,36 +54,43 @@
61 <item>
62 <attribute name="label" translatable="yes">Side _Pane</attribute>
63 <attribute name="action">win.show-side-pane</attribute>
64+ <attribute name="accel">F9</attribute>
65 </item>
66 </section>
67 <section>
68 <item>
69 <attribute name="label" translatable="yes">_Fullscreen</attribute>
70 <attribute name="action">win.fullscreen</attribute>
71+ <attribute name="accel">F11</attribute>
72 </item>
73 <item>
74 <attribute name="label" translatable="yes">Pre_sentation</attribute>
75 <attribute name="action">win.presentation</attribute>
76+ <attribute name="accel">F5</attribute>
77 </item>
78 </section>
79 <section>
80 <item>
81 <attribute name="label" translatable="yes">Rotate _Left</attribute>
82 <attribute name="action">win.rotate-left</attribute>
83+ <attribute name="accel">&lt;Ctrl&gt;Left</attribute>
84 </item>
85 <item>
86 <attribute name="label" translatable="yes">Rotate _Right</attribute>
87 <attribute name="action">win.rotate-right</attribute>
88+ <attribute name="accel">&lt;Ctrl&gt;Right</attribute>
89 </item>
90 </section>
91 <section>
92 <item>
93 <attribute name="label" translatable="yes">Zoom _In</attribute>
94 <attribute name="action">win.zoom-in</attribute>
95+ <attribute name="accel">&lt;Ctrl&gt;plus</attribute>
96 </item>
97 <item>
98 <attribute name="label" translatable="yes">Zoom _Out</attribute>
99 <attribute name="action">win.zoom-out</attribute>
100+ <attribute name="accel">&lt;Ctrl&gt;minus</attribute>
101 </item>
102 </section>
103 <section>
104@@ -92,12 +101,14 @@
105 <item>
106 <attribute name="label" translatable="yes">_Inverted Colors</attribute>
107 <attribute name="action">win.inverted-colors</attribute>
108+ <attribute name="accel">&lt;Ctrl&gt;I</attribute>
109 </item>
110 </section>
111 <section>
112 <item>
113 <attribute name="label" translatable="yes">_Reload</attribute>
114 <attribute name="action">win.reload</attribute>
115+ <attribute name="accel">&lt;Ctrl&gt;R</attribute>
116 </item>
117 </section>
118 </menu>
119@@ -107,10 +118,12 @@
120 <item>
121 <attribute name="label" translatable="yes">_Open…</attribute>
122 <attribute name="action">app.open</attribute>
123+ <attribute name="accel">&lt;Ctrl&gt;O</attribute>
124 </item>
125 <item>
126 <attribute name="label" translatable="yes">Op_en a Copy</attribute>
127 <attribute name="action">win.open-copy</attribute>
128+ <attribute name="accel">&lt;Ctrl&gt;N</attribute>
129 </item>
130 <item>
131 <attribute name="label" translatable="yes">_Recent</attribute>
132@@ -120,6 +133,7 @@
133 <item>
134 <attribute name="label" translatable="yes">_Save a Copy…</attribute>
135 <attribute name="action">win.save-copy</attribute>
136+ <attribute name="accel">&lt;Ctrl&gt;S</attribute>
137 </item>
138 <item>
139 <attribute name="label" translatable="yes">Send _To…</attribute>
140@@ -132,22 +146,26 @@
141 <item>
142 <attribute name="label" translatable="yes">_Print…</attribute>
143 <attribute name="action">win.print</attribute>
144+ <attribute name="accel">&lt;Ctrl&gt;P</attribute>
145 </item>
146 </section>
147 <section>
148 <item>
149 <attribute name="label" translatable="yes">P_roperties…</attribute>
150 <attribute name="action">win.show-properties</attribute>
151+ <attribute name="accel">&lt;Alt&gt;Return</attribute>
152 </item>
153 </section>
154 <section>
155 <item>
156 <attribute name="label" translatable="yes">_Copy</attribute>
157 <attribute name="action">win.copy</attribute>
158+ <attribute name="accel">&lt;Ctrl&gt;C</attribute>
159 </item>
160 <item>
161 <attribute name="label" translatable="yes">Select _All</attribute>
162 <attribute name="action">win.select-all</attribute>
163+ <attribute name="accel">&lt;Ctrl&gt;A</attribute>
164 </item>
165 </section>
166 <section>
167@@ -160,22 +178,26 @@
168 <item>
169 <attribute name="label" translatable="yes">_First Page</attribute>
170 <attribute name="action">win.go-first-page</attribute>
171+ <attribute name="accel">&lt;Ctrl&gt;Home</attribute>
172 </item>
173 <item>
174 <attribute name="label" translatable="yes">_Last Page</attribute>
175 <attribute name="action">win.go-last-page</attribute>
176+ <attribute name="accel">&lt;Ctrl&gt;End</attribute>
177 </item>
178 </section>
179 <section id="bookmarks">
180 <item>
181 <attribute name="label" translatable="yes">_Add Bookmark</attribute>
182 <attribute name="action">win.add-bookmark</attribute>
183+ <attribute name="accel">&lt;Ctrl&gt;D</attribute>
184 </item>
185 </section>
186 <section>
187 <item>
188 <attribute name="label" translatable="yes">_Close</attribute>
189 <attribute name="action">win.close</attribute>
190+ <attribute name="accel">&lt;Ctrl&gt;W</attribute>
191 </item>
192 </section>
193 <section>
1940
=== removed file 'debian/patches/gtk310-secondary-keybindings.patch'
--- debian/patches/gtk310-secondary-keybindings.patch 2014-06-03 13:44:50 +0000
+++ debian/patches/gtk310-secondary-keybindings.patch 1970-01-01 00:00:00 +0000
@@ -1,86 +0,0 @@
1From 24c0293b4d520193553d99f1423b9e0394eec0ef Mon Sep 17 00:00:00 2001
2From: Lars Uebernickel <lars.uebernickel@canonical.com>
3Date: Tue, 11 Mar 2014 17:00:02 +0100
4Subject: [PATCH] Add secondary (and tertiary) keybindings
5
6gtk_application_add_accelerator() can only add one accel per action.
7Duplicate the actions so that we can add multiple accels. This is very
8gross, but only needed until we update to gtk 3.12, which introduces a
9new function that can handle setting multiple accels for a single
10action.
11---
12 shell/ev-application.c | 10 ++++++++++
13 shell/ev-window.c | 10 ++++++++++
14 2 files changed, 20 insertions(+)
15
16diff --git a/shell/ev-application.c b/shell/ev-application.c
17index 4493b1e..65064b1 100644
18--- a/shell/ev-application.c
19+++ b/shell/ev-application.c
20@@ -1093,6 +1093,7 @@ ev_application_startup (GApplication *gapplication)
21 "win.save-copy", "<Ctrl>S", NULL,
22 "win.print", "<Ctrl>P", NULL,
23 "win.copy", "<Ctrl>C", "<Ctrl>Insert", NULL,
24+ "win.copy2", "<Ctrl>Insert", NULL,
25 "win.select-all", "<Ctrl>A", NULL,
26 "win.save-settings", "<Ctrl>T", NULL,
27 "win.go-first-page", "<Ctrl>Home", NULL,
28@@ -1107,13 +1108,22 @@ ev_application_startup (GApplication *gapplication)
29 "win.go-backward", "<Shift>Page_Up", NULL,
30 "win.go-forward", "<Shift>Page_Down", NULL,
31 "win.go-next-page", "<Ctrl>Page_Down", "n", NULL,
32+ "win.go-next-page2", "n", NULL,
33 "win.go-previous-page", "<Ctrl>Page_Up", "p", NULL,
34+ "win.go-previous-page2", "p", NULL,
35 "win.sizing-mode::fit-page", "f", NULL,
36 "win.sizing-mode::fit-width", "w", NULL,
37 "win.open-menu", "F10", NULL,
38 "win.caret-navigation", "F7", NULL,
39 "win.zoom-in", "plus", "<Ctrl>plus", "KP_Add", "<Ctrl>KP_Add", "equal", NULL,
40+ "win.zoom-in2", "<Ctrl>plus", "KP_Add", "<Ctrl>KP_Add", NULL,
41+ "win.zoom-in3", "KP_Add", "<Ctrl>KP_Add", NULL,
42+ "win.zoom-in4", "<Ctrl>KP_Add", NULL,
43+ "win.zoom-in5", "equal", NULL,
44 "win.zoom-out", "minus", "<Ctrl>minus", "KP_Subtract", "<Ctrl>KP_Subtract", NULL,
45+ "win.zoom-out2", "<Ctrl>minus", "KP_Subtract", "<Ctrl>KP_Subtract", NULL,
46+ "win.zoom-out3", "KP_Subtract", "<Ctrl>KP_Subtract", NULL,
47+ "win.zoom-out4", "<Ctrl>KP_Subtract", NULL,
48 "win.show-side-pane", "F9", NULL,
49 "win.fullscreen", "F11", NULL,
50 "win.presentation", "F5", NULL,
51diff --git a/shell/ev-window.c b/shell/ev-window.c
52index fc2258e..9f685fa 100644
53--- a/shell/ev-window.c
54+++ b/shell/ev-window.c
55@@ -6658,10 +6658,13 @@ ev_window_init (EvWindow *ev_window)
56 { "print", ev_window_activate_print_action, NULL, NULL, NULL },
57 { "show-properties", ev_window_activate_show_properties_action, NULL, NULL, NULL },
58 { "copy", ev_window_activate_copy_action, NULL, NULL, NULL },
59+ { "copy2", ev_window_activate_copy_action, NULL, NULL, NULL },
60 { "select-all", ev_window_activate_select_all_action, NULL, NULL, NULL },
61 { "save-settings", ev_window_activate_save_settings_action, NULL, NULL, NULL },
62 { "go-previous-page", ev_window_activate_go_previous_page_action, NULL, NULL, NULL },
63+ { "go-previous-page2", ev_window_activate_go_previous_page_action, NULL, NULL, NULL },
64 { "go-next-page", ev_window_activate_go_next_page_action, NULL, NULL, NULL },
65+ { "go-next-page2", ev_window_activate_go_next_page_action, NULL, NULL, NULL },
66 { "go-first-page", ev_window_activate_go_first_page_action, NULL, NULL, NULL },
67 { "go-last-page", ev_window_activate_go_last_page_action, NULL, NULL, NULL },
68 { "go-forward", ev_window_activate_go_forward_action, NULL, NULL, NULL },
69@@ -6680,7 +6683,14 @@ ev_window_init (EvWindow *ev_window)
70 { "rotate-left", ev_window_activate_rotate_left_action, NULL, NULL, NULL },
71 { "rotate-right", ev_window_activate_rotate_right_action, NULL, NULL, NULL },
72 { "zoom-in", ev_window_activate_zoom_in_action, NULL, NULL, NULL },
73+ { "zoom-in2", ev_window_activate_zoom_in_action, NULL, NULL, NULL },
74+ { "zoom-in3", ev_window_activate_zoom_in_action, NULL, NULL, NULL },
75+ { "zoom-in4", ev_window_activate_zoom_in_action, NULL, NULL, NULL },
76+ { "zoom-in5", ev_window_activate_zoom_in_action, NULL, NULL, NULL },
77 { "zoom-out", ev_window_activate_zoom_out_action, NULL, NULL, NULL },
78+ { "zoom-out2", ev_window_activate_zoom_out_action, NULL, NULL, NULL },
79+ { "zoom-out3", ev_window_activate_zoom_out_action, NULL, NULL, NULL },
80+ { "zoom-out4", ev_window_activate_zoom_out_action, NULL, NULL, NULL },
81 { "reload", ev_window_activate_reload_action, NULL, NULL, NULL },
82 { "auto-scroll", ev_window_activate_auto_scroll_action, NULL, NULL, NULL },
83 { "add-bookmark", ev_window_activate_add_bookmark_action, NULL, NULL, NULL },
84--
851.9.1
86
870
=== modified file 'debian/patches/series'
--- debian/patches/series 2014-03-11 17:35:19 +0000
+++ debian/patches/series 2014-07-15 08:15:31 +0000
@@ -1,5 +1,3 @@
111_grip_gestures.patch111_grip_gestures.patch
2git_Don-t-allow-Send-To-when-there-is-no-mail-client-ava.patch2git_Don-t-allow-Send-To-when-there-is-no-mail-client-ava.patch
30001-Port-to-GMenuModel-and-add-menu-bar.patch30001-Port-to-GMenuModel-and-add-menu-bar.patch
40002-Don-t-use-gtk_application_set_accels_for_action.patch
5gtk310-secondary-keybindings.patch

Subscribers

People subscribed via source and target branches

to all changes: