Merge lp:~radumstoica/ubuntu/quantal/xfce4-terminal/scroll-alternate-src-patch into lp:ubuntu/quantal/xfce4-terminal
- Quantal (12.10)
- scroll-alternate-src-patch
- Merge into quantal
Status: | Merged |
---|---|
Merged at revision: | 57 |
Proposed branch: | lp:~radumstoica/ubuntu/quantal/xfce4-terminal/scroll-alternate-src-patch |
Merge into: | lp:ubuntu/quantal/xfce4-terminal |
Diff against target: |
456 lines (+93/-322) 6 files modified
.pc/applied-patches (+0/-1) .pc/xubuntu_fix-invalid-anchor.patch/terminal/terminal-dialogs.c (+0/-313) debian/changelog (+14/-0) debian/patches/scroll-alternate-src-togglable.patch (+77/-0) debian/patches/series (+1/-0) terminal/terminal-dialogs.c (+1/-8) |
To merge this branch: | bzr merge lp:~radumstoica/ubuntu/quantal/xfce4-terminal/scroll-alternate-src-patch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Iain Lane | Approve | ||
David Henningsson (community) | Needs Fixing | ||
Ubuntu branches | Pending | ||
Review via email: mp+124570@code.launchpad.net |
Commit message
Description of the change
Enabled scrolling in ncurses apps using mouse wheel. (lp: #947892)
- 57. By RaduStoica
-
* debian/patches:
- scroll-alternate- src-togglable. patch: enable scrolling in ncurses
apps with mouse wheel. lp: #947892
- 58. By RaduStoica
-
Unapplied all quilt patches.
RaduStoica (radumstoica) wrote : | # |
> Hi RaduStoica, and thanks for trying to help out!
>
> I gave your merge proposal a quick review as part of the patch pilot program.
> And I noticed something strange while doing so - your commit does not only add
> the patch but also applies it, which means changes to files outside the debian
> directory.
>
> Looking a bit back in history, it seems you're not the only one who has done
> this. As such I think it would make the most sense to do two commits: the
> first would just unapply all patches (to correct the previous stuff), the
> second one would add your patch without applying it (i e, only changes to
> debian/changelog, debian/
> src-togglable.
>
> The actual patch content looks okay to me so hopefully it can be merged (by
> somebody with the appropriate upload rights, which I don't have) after that.
Thanks for taking the time to look at my branch! I'm still a bit confused about
how the quilt patching works, so that's why I commited the files with the patch
applied.
I've done a new commit now, with all patches unapplied. The patch for scrolling
in ncurses apps is still added in the debian/
think a second commit is needed. Let me know what's your opinion - I can make
a clean branch and add the patch to that one, if this one seems too messy.
Iain Lane (laney) wrote : | # |
Thank you, I've merged it and uploaded to Quantal. There was no need to create a new version for the .pc fiddling - the mantra is one version per upload. Anyway, I'm sure I messed that up again while merging. It's complex :P
Preview Diff
1 | === removed file '.pc/applied-patches' | |||
2 | --- .pc/applied-patches 2012-04-05 20:07:06 +0000 | |||
3 | +++ .pc/applied-patches 1970-01-01 00:00:00 +0000 | |||
4 | @@ -1,1 +0,0 @@ | |||
5 | 1 | xubuntu_fix-invalid-anchor.patch | ||
6 | 2 | 0 | ||
7 | === removed directory '.pc/xubuntu_fix-invalid-anchor.patch' | |||
8 | === removed directory '.pc/xubuntu_fix-invalid-anchor.patch/terminal' | |||
9 | === removed file '.pc/xubuntu_fix-invalid-anchor.patch/terminal/terminal-dialogs.c' | |||
10 | --- .pc/xubuntu_fix-invalid-anchor.patch/terminal/terminal-dialogs.c 2012-04-05 20:07:06 +0000 | |||
11 | +++ .pc/xubuntu_fix-invalid-anchor.patch/terminal/terminal-dialogs.c 1970-01-01 00:00:00 +0000 | |||
12 | @@ -1,313 +0,0 @@ | |||
13 | 1 | /*- | ||
14 | 2 | * Copyright (c) 2005-2007 Benedikt Meurer <benny@xfce.org> | ||
15 | 3 | * | ||
16 | 4 | * This program is free software; you can redistribute it and/or modify it | ||
17 | 5 | * under the terms of the GNU General Public License as published by the Free | ||
18 | 6 | * Software Foundation; either version 2 of the License, or (at your option) | ||
19 | 7 | * any later version. | ||
20 | 8 | * | ||
21 | 9 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
22 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
23 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
24 | 12 | * more details. | ||
25 | 13 | * | ||
26 | 14 | * You should have received a copy of the GNU General Public License along with | ||
27 | 15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
28 | 16 | * Place, Suite 330, Boston, MA 02111-1307 USA | ||
29 | 17 | */ | ||
30 | 18 | |||
31 | 19 | #ifdef HAVE_CONFIG_H | ||
32 | 20 | #include <config.h> | ||
33 | 21 | #endif | ||
34 | 22 | |||
35 | 23 | #ifdef HAVE_STDARG_H | ||
36 | 24 | #include <stdarg.h> | ||
37 | 25 | #endif | ||
38 | 26 | #ifdef HAVE_LOCALE_H | ||
39 | 27 | #include <locale.h> | ||
40 | 28 | #endif | ||
41 | 29 | |||
42 | 30 | #include <exo/exo.h> | ||
43 | 31 | |||
44 | 32 | #include <terminal/terminal-dialogs.h> | ||
45 | 33 | #include <terminal/terminal-private.h> | ||
46 | 34 | |||
47 | 35 | |||
48 | 36 | |||
49 | 37 | /** | ||
50 | 38 | * terminal_dialogs_show_about: | ||
51 | 39 | * @parent : the parent #GtkWindow or %NULL. | ||
52 | 40 | * @title : the software title. | ||
53 | 41 | * @format : the printf()-style format for the main text in the about dialog. | ||
54 | 42 | * @... : argument list for the @format. | ||
55 | 43 | * | ||
56 | 44 | * Displays the Terminal about dialog with @format as main text. | ||
57 | 45 | **/ | ||
58 | 46 | void | ||
59 | 47 | terminal_dialogs_show_about (GtkWindow *parent) | ||
60 | 48 | { | ||
61 | 49 | static const gchar *authors[] = | ||
62 | 50 | { | ||
63 | 51 | "Benedikt Meurer <benny@xfce.org>", | ||
64 | 52 | "Nick Schermer <nick@xfce.org>", | ||
65 | 53 | NULL, | ||
66 | 54 | }; | ||
67 | 55 | |||
68 | 56 | static const gchar *artists[] = | ||
69 | 57 | { | ||
70 | 58 | "Francois Le Clainche <fleclainche@wanadoo.fr>", | ||
71 | 59 | NULL, | ||
72 | 60 | }; | ||
73 | 61 | |||
74 | 62 | static const gchar *documenters[] = | ||
75 | 63 | { | ||
76 | 64 | "Benedikt Meurer <benny@xfce.org>", | ||
77 | 65 | "Andrew Conkling <andrewski@fr.st>", | ||
78 | 66 | "Nick Schermer <nick@xfce.org>", | ||
79 | 67 | NULL, | ||
80 | 68 | }; | ||
81 | 69 | |||
82 | 70 | GdkPixbuf *logo = NULL; | ||
83 | 71 | GtkIconTheme *theme; | ||
84 | 72 | |||
85 | 73 | /* try to load the about logo */ | ||
86 | 74 | theme = gtk_icon_theme_get_default (); | ||
87 | 75 | if (gtk_icon_theme_has_icon (theme, "utilities-terminal")) | ||
88 | 76 | logo = gtk_icon_theme_load_icon (theme, "utilities-terminal", 128, GTK_ICON_LOOKUP_FORCE_SVG, NULL); | ||
89 | 77 | if (logo == NULL) | ||
90 | 78 | logo = gdk_pixbuf_new_from_file_at_size (DATADIR "/icons/hicolor/scalable/apps/Terminal.svg", 128, 128, NULL); | ||
91 | 79 | |||
92 | 80 | /* set dialog hook on gtk versions older then 2.18 */ | ||
93 | 81 | #if !GTK_CHECK_VERSION (2, 18, 0) | ||
94 | 82 | #if EXO_CHECK_VERSION (0, 5, 0) | ||
95 | 83 | gtk_about_dialog_set_email_hook (exo_gtk_url_about_dialog_hook, NULL, NULL); | ||
96 | 84 | gtk_about_dialog_set_url_hook (exo_gtk_url_about_dialog_hook, NULL, NULL); | ||
97 | 85 | #else | ||
98 | 86 | gtk_about_dialog_set_email_hook (exo_url_about_dialog_hook, NULL, NULL); | ||
99 | 87 | gtk_about_dialog_set_url_hook (exo_url_about_dialog_hook, NULL, NULL); | ||
100 | 88 | #endif | ||
101 | 89 | #endif | ||
102 | 90 | |||
103 | 91 | /* open the about dialog */ | ||
104 | 92 | gtk_show_about_dialog (parent, | ||
105 | 93 | "authors", authors, | ||
106 | 94 | "artists", artists, | ||
107 | 95 | "comments", _("Xfce Terminal Emulator"), | ||
108 | 96 | "documenters", documenters, | ||
109 | 97 | "copyright", "Copyright \302\251 2003-2008 Benedikt Meurer\n" | ||
110 | 98 | "Copyright \302\251 2007-2011 Nick Schermer", | ||
111 | 99 | "license", XFCE_LICENSE_GPL, | ||
112 | 100 | "logo", logo, | ||
113 | 101 | "program-name", g_get_application_name (), | ||
114 | 102 | "translator-credits", _("translator-credits"), | ||
115 | 103 | "version", PACKAGE_VERSION, | ||
116 | 104 | "website", "http://goodies.xfce.org/projects/applications/terminal", | ||
117 | 105 | "website-label", _("Visit Terminal website"), | ||
118 | 106 | NULL); | ||
119 | 107 | |||
120 | 108 | /* release the about logo (if any) */ | ||
121 | 109 | if (G_LIKELY (logo != NULL)) | ||
122 | 110 | g_object_unref (G_OBJECT (logo)); | ||
123 | 111 | } | ||
124 | 112 | |||
125 | 113 | |||
126 | 114 | |||
127 | 115 | /** | ||
128 | 116 | * terminal_dialogs_show_error: | ||
129 | 117 | * @parent : a #GtkWidget on which the error dialog should be shown, or a #GdkScreen | ||
130 | 118 | * if no #GtkWidget is known. May also be %NULL, in which case the default | ||
131 | 119 | * #GdkScreen will be used. | ||
132 | 120 | * @error : a #GError, which gives a more precise description of the problem or %NULL. | ||
133 | 121 | * @format : the printf()-style format for the primary problem description. | ||
134 | 122 | * @... : argument list for the @format. | ||
135 | 123 | * | ||
136 | 124 | * Displays an error dialog on @widget using the @format as primary message and optionally | ||
137 | 125 | * displaying @error as secondary error text. | ||
138 | 126 | * | ||
139 | 127 | * If @widget is not %NULL and @widget is part of a #GtkWindow, the function makes sure | ||
140 | 128 | * that the toplevel window is visible prior to displaying the error dialog. | ||
141 | 129 | **/ | ||
142 | 130 | void | ||
143 | 131 | terminal_dialogs_show_error (gpointer parent, | ||
144 | 132 | const GError *error, | ||
145 | 133 | const gchar *format, | ||
146 | 134 | ...) | ||
147 | 135 | { | ||
148 | 136 | GtkWidget *dialog; | ||
149 | 137 | GtkWidget *window = NULL; | ||
150 | 138 | GdkScreen *screen; | ||
151 | 139 | va_list args; | ||
152 | 140 | gchar *primary_text; | ||
153 | 141 | |||
154 | 142 | terminal_return_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WIDGET (parent)); | ||
155 | 143 | |||
156 | 144 | /* determine the proper parent */ | ||
157 | 145 | if (parent == NULL) | ||
158 | 146 | { | ||
159 | 147 | /* just use the default screen then */ | ||
160 | 148 | screen = gdk_screen_get_default (); | ||
161 | 149 | } | ||
162 | 150 | else if (GDK_IS_SCREEN (parent)) | ||
163 | 151 | { | ||
164 | 152 | /* yep, that's a screen */ | ||
165 | 153 | screen = GDK_SCREEN (parent); | ||
166 | 154 | } | ||
167 | 155 | else | ||
168 | 156 | { | ||
169 | 157 | /* parent is a widget, so let's determine the toplevel window */ | ||
170 | 158 | window = gtk_widget_get_toplevel (GTK_WIDGET (parent)); | ||
171 | 159 | if (GTK_WIDGET_TOPLEVEL (window)) | ||
172 | 160 | { | ||
173 | 161 | /* make sure the toplevel window is shown */ | ||
174 | 162 | gtk_widget_show_now (window); | ||
175 | 163 | } | ||
176 | 164 | else | ||
177 | 165 | { | ||
178 | 166 | /* no toplevel, not usable then */ | ||
179 | 167 | window = NULL; | ||
180 | 168 | } | ||
181 | 169 | |||
182 | 170 | /* determine the screen for the widget */ | ||
183 | 171 | screen = gtk_widget_get_screen (GTK_WIDGET (parent)); | ||
184 | 172 | } | ||
185 | 173 | |||
186 | 174 | /* determine the primary error text */ | ||
187 | 175 | va_start (args, format); | ||
188 | 176 | primary_text = g_strdup_vprintf (format, args); | ||
189 | 177 | va_end (args); | ||
190 | 178 | |||
191 | 179 | /* allocate the error dialog */ | ||
192 | 180 | dialog = gtk_message_dialog_new ((GtkWindow *) window, | ||
193 | 181 | GTK_DIALOG_DESTROY_WITH_PARENT | ||
194 | 182 | | GTK_DIALOG_MODAL, | ||
195 | 183 | GTK_MESSAGE_ERROR, | ||
196 | 184 | GTK_BUTTONS_CLOSE, | ||
197 | 185 | "%s.", primary_text); | ||
198 | 186 | |||
199 | 187 | /* move the dialog to the appropriate screen */ | ||
200 | 188 | if (window == NULL && screen != NULL) | ||
201 | 189 | gtk_window_set_screen (GTK_WINDOW (dialog), screen); | ||
202 | 190 | |||
203 | 191 | /* set secondary text if an error is provided */ | ||
204 | 192 | if (G_LIKELY (error != NULL)) | ||
205 | 193 | gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s.", error->message); | ||
206 | 194 | |||
207 | 195 | /* display the dialog */ | ||
208 | 196 | gtk_dialog_run (GTK_DIALOG (dialog)); | ||
209 | 197 | |||
210 | 198 | /* cleanup */ | ||
211 | 199 | gtk_widget_destroy (dialog); | ||
212 | 200 | g_free (primary_text); | ||
213 | 201 | } | ||
214 | 202 | |||
215 | 203 | |||
216 | 204 | |||
217 | 205 | static gboolean | ||
218 | 206 | terminal_dialogs_show_help_ask_online (GtkWindow *parent) | ||
219 | 207 | { | ||
220 | 208 | GtkWidget *dialog; | ||
221 | 209 | GtkWidget *button; | ||
222 | 210 | GtkWidget *image; | ||
223 | 211 | gint response_id; | ||
224 | 212 | |||
225 | 213 | dialog = gtk_message_dialog_new (parent, GTK_DIALOG_DESTROY_WITH_PARENT, | ||
226 | 214 | GTK_MESSAGE_QUESTION, GTK_BUTTONS_CANCEL, | ||
227 | 215 | _("The %s user manual is not installed on your computer"), | ||
228 | 216 | g_get_application_name ()); | ||
229 | 217 | gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), | ||
230 | 218 | _("You can read the user manual online. This manual may however " | ||
231 | 219 | "not exactly match your %s version."), g_get_application_name ()); | ||
232 | 220 | gtk_window_set_title (GTK_WINDOW (dialog), _("User manual is missing")); | ||
233 | 221 | |||
234 | 222 | button = gtk_button_new_with_mnemonic (_("_Read Online")); | ||
235 | 223 | gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_ACCEPT); | ||
236 | 224 | gtk_widget_show (button); | ||
237 | 225 | |||
238 | 226 | image = gtk_image_new_from_icon_name ("web-browser", GTK_ICON_SIZE_BUTTON); | ||
239 | 227 | gtk_button_set_image (GTK_BUTTON (button), image); | ||
240 | 228 | gtk_widget_show (image); | ||
241 | 229 | |||
242 | 230 | response_id = gtk_dialog_run (GTK_DIALOG (dialog)); | ||
243 | 231 | |||
244 | 232 | gtk_widget_destroy (dialog); | ||
245 | 233 | |||
246 | 234 | return (response_id == GTK_RESPONSE_ACCEPT); | ||
247 | 235 | } | ||
248 | 236 | |||
249 | 237 | |||
250 | 238 | |||
251 | 239 | /** | ||
252 | 240 | * terminal_dialogs_show_help: | ||
253 | 241 | * @parent : a #GtkWindow. | ||
254 | 242 | * #GdkScreen will be used. | ||
255 | 243 | * @page : the name of the page of the user manual to display or %NULL to display | ||
256 | 244 | * the overview page. | ||
257 | 245 | * @offset : the offset of the topic in the @page to display or %NULL to just display | ||
258 | 246 | * @page. | ||
259 | 247 | * | ||
260 | 248 | * Displays the Terminal user manual. If @page is not %NULL it specifies the basename | ||
261 | 249 | * of the HTML file to display. @offset may refer to a anchor in the @page. | ||
262 | 250 | **/ | ||
263 | 251 | void | ||
264 | 252 | terminal_dialogs_show_help (GtkWindow *parent, | ||
265 | 253 | const gchar *page, | ||
266 | 254 | const gchar *offset) | ||
267 | 255 | { | ||
268 | 256 | GError *error = NULL; | ||
269 | 257 | gchar *filename; | ||
270 | 258 | gchar *locale; | ||
271 | 259 | gboolean exists; | ||
272 | 260 | gchar *uri = NULL; | ||
273 | 261 | |||
274 | 262 | terminal_return_if_fail (GTK_IS_WINDOW (parent)); | ||
275 | 263 | |||
276 | 264 | /* use index page */ | ||
277 | 265 | if (page == NULL) | ||
278 | 266 | page = "index.html"; | ||
279 | 267 | |||
280 | 268 | /* get the locale of the user */ | ||
281 | 269 | locale = g_strdup (setlocale (LC_MESSAGES, NULL)); | ||
282 | 270 | if (G_LIKELY (locale != NULL)) | ||
283 | 271 | locale = g_strdelimit (locale, "._", '\0'); | ||
284 | 272 | else | ||
285 | 273 | locale = g_strdup ("C"); | ||
286 | 274 | |||
287 | 275 | /* check if the help page exists on the system */ | ||
288 | 276 | filename = g_build_filename (HELPDIR, locale, page, NULL); | ||
289 | 277 | exists = g_file_test (filename, G_FILE_TEST_EXISTS); | ||
290 | 278 | if (!exists && strcmp (locale, "C") != 0) | ||
291 | 279 | { | ||
292 | 280 | g_free (filename); | ||
293 | 281 | filename = g_build_filename (HELPDIR, "C", page, NULL); | ||
294 | 282 | exists = g_file_test (filename, G_FILE_TEST_EXISTS); | ||
295 | 283 | } | ||
296 | 284 | |||
297 | 285 | /* build the full uri, fallback to online docs if nothing was found */ | ||
298 | 286 | if (G_LIKELY (exists)) | ||
299 | 287 | { | ||
300 | 288 | uri = g_strconcat ("file://", filename, "#", offset, NULL); | ||
301 | 289 | } | ||
302 | 290 | else if (terminal_dialogs_show_help_ask_online (parent)) | ||
303 | 291 | { | ||
304 | 292 | uri = g_strconcat ("http://docs.xfce.org/help.php?package=terminal&lang=", | ||
305 | 293 | locale, "&page=", page, "&anchor=", offset, NULL); | ||
306 | 294 | } | ||
307 | 295 | |||
308 | 296 | g_free (filename); | ||
309 | 297 | g_free (locale); | ||
310 | 298 | |||
311 | 299 | /* try to run the documentation browser */ | ||
312 | 300 | if (uri != NULL | ||
313 | 301 | && !exo_execute_preferred_application_on_screen ("WebBrowser", uri, NULL, | ||
314 | 302 | NULL, gtk_window_get_screen (parent), | ||
315 | 303 | &error)) | ||
316 | 304 | { | ||
317 | 305 | /* display an error message to the user */ | ||
318 | 306 | terminal_dialogs_show_error (parent, error, _("Failed to open the documentation browser")); | ||
319 | 307 | g_error_free (error); | ||
320 | 308 | } | ||
321 | 309 | |||
322 | 310 | g_free (uri); | ||
323 | 311 | } | ||
324 | 312 | |||
325 | 313 | |||
326 | 314 | 0 | ||
327 | === modified file 'debian/changelog' | |||
328 | --- debian/changelog 2012-05-19 19:29:26 +0000 | |||
329 | +++ debian/changelog 2012-09-20 16:50:23 +0000 | |||
330 | @@ -1,3 +1,17 @@ | |||
331 | 1 | xfce4-terminal (0.4.8-1ubuntu4) quantal; urgency=low | ||
332 | 2 | |||
333 | 3 | * Unapplied all quilt patches. | ||
334 | 4 | |||
335 | 5 | -- Radu Stoica <radumstoica@gmail.com> Thu, 20 Sep 2012 19:32:27 +0300 | ||
336 | 6 | |||
337 | 7 | xfce4-terminal (0.4.8-1ubuntu3) quantal; urgency=low | ||
338 | 8 | |||
339 | 9 | * debian/patches: | ||
340 | 10 | - scroll-alternate-src-togglable.patch: enable scrolling in ncurses | ||
341 | 11 | apps with mouse wheel. lp: #947892 | ||
342 | 12 | |||
343 | 13 | -- Radu Stoica <radumstoica@gmail.com> Sun, 16 Sep 2012 14:38:25 +0300 | ||
344 | 14 | |||
345 | 1 | xfce4-terminal (0.4.8-1ubuntu2) quantal; urgency=low | 15 | xfce4-terminal (0.4.8-1ubuntu2) quantal; urgency=low |
346 | 2 | 16 | ||
347 | 3 | * No change rebuild against libxfce4util6. | 17 | * No change rebuild against libxfce4util6. |
348 | 4 | 18 | ||
349 | === added file 'debian/patches/scroll-alternate-src-togglable.patch' | |||
350 | --- debian/patches/scroll-alternate-src-togglable.patch 1970-01-01 00:00:00 +0000 | |||
351 | +++ debian/patches/scroll-alternate-src-togglable.patch 2012-09-20 16:50:23 +0000 | |||
352 | @@ -0,0 +1,77 @@ | |||
353 | 1 | === modified file 'terminal/terminal-preferences.c' | ||
354 | 2 | --- a/terminal/terminal-preferences.c 2011-06-22 00:03:08 +0000 | ||
355 | 3 | +++ b/terminal/terminal-preferences.c 2012-09-15 06:00:24 +0000 | ||
356 | 4 | @@ -121,6 +121,7 @@ | ||
357 | 5 | PROP_MISC_TAB_CLOSE_MIDDLE_CLICK, | ||
358 | 6 | PROP_MISC_TAB_POSITION, | ||
359 | 7 | PROP_MISC_HIGHLIGHT_URLS, | ||
360 | 8 | + PROP_MISC_SCROLL_ALTERNATE_SCREEN, | ||
361 | 9 | PROP_SCROLLING_BAR, | ||
362 | 10 | PROP_SCROLLING_LINES, | ||
363 | 11 | PROP_SCROLLING_ON_OUTPUT, | ||
364 | 12 | @@ -1240,6 +1241,19 @@ | ||
365 | 13 | EXO_PARAM_READWRITE)); | ||
366 | 14 | |||
367 | 15 | /** | ||
368 | 16 | + * TerminalPreferences:misc-scroll-alternate-screen: | ||
369 | 17 | + * | ||
370 | 18 | + * Whether to scroll the alternate screen with the mouse wheel | ||
371 | 19 | + **/ | ||
372 | 20 | + g_object_class_install_property (gobject_class, | ||
373 | 21 | + PROP_MISC_SCROLL_ALTERNATE_SCREEN, | ||
374 | 22 | + g_param_spec_boolean("misc-scroll-alternate-screen", | ||
375 | 23 | + "misc-scroll-alternate-screen", | ||
376 | 24 | + "MiscScrollAlternateScreen", | ||
377 | 25 | + TRUE, | ||
378 | 26 | + EXO_PARAM_READWRITE)); | ||
379 | 27 | + | ||
380 | 28 | + /** | ||
381 | 29 | * TerminalPreferences:shortcuts-no-menukey: | ||
382 | 30 | * | ||
383 | 31 | * Disable menu shortcut key (F10 by default). | ||
384 | 32 | |||
385 | 33 | === modified file 'terminal/terminal-screen.c' | ||
386 | 34 | --- a/terminal/terminal-screen.c 2011-06-22 00:03:08 +0000 | ||
387 | 35 | +++ b/terminal/terminal-screen.c 2012-09-15 06:00:24 +0000 | ||
388 | 36 | @@ -99,6 +99,7 @@ | ||
389 | 37 | static void terminal_screen_update_misc_cursor_blinks (TerminalScreen *screen); | ||
390 | 38 | static void terminal_screen_update_misc_cursor_shape (TerminalScreen *screen); | ||
391 | 39 | static void terminal_screen_update_misc_mouse_autohide (TerminalScreen *screen); | ||
392 | 40 | +static void terminal_screen_update_scrolling_alternate (TerminalScreen *screen); | ||
393 | 41 | static void terminal_screen_update_scrolling_bar (TerminalScreen *screen); | ||
394 | 42 | static void terminal_screen_update_scrolling_lines (TerminalScreen *screen); | ||
395 | 43 | static void terminal_screen_update_scrolling_on_output (TerminalScreen *screen); | ||
396 | 44 | @@ -291,6 +292,7 @@ | ||
397 | 45 | "swapped-signal::notify::misc-cursor-blinks", G_CALLBACK (terminal_screen_update_misc_cursor_blinks), screen, | ||
398 | 46 | "swapped-signal::notify::misc-cursor-shape", G_CALLBACK (terminal_screen_update_misc_cursor_shape), screen, | ||
399 | 47 | "swapped-signal::notify::misc-mouse-autohide", G_CALLBACK (terminal_screen_update_misc_mouse_autohide), screen, | ||
400 | 48 | + "swapped-signal::notify::misc-scroll-alternate-screen", G_CALLBACK (terminal_screen_update_scrolling_alternate), screen, | ||
401 | 49 | "swapped-signal::notify::scrolling-bar", G_CALLBACK (terminal_screen_update_scrolling_bar), screen, | ||
402 | 50 | "swapped-signal::notify::scrolling-lines", G_CALLBACK (terminal_screen_update_scrolling_lines), screen, | ||
403 | 51 | "swapped-signal::notify::scrolling-on-output", G_CALLBACK (terminal_screen_update_scrolling_on_output), screen, | ||
404 | 52 | @@ -309,6 +311,7 @@ | ||
405 | 53 | terminal_screen_update_misc_cursor_blinks (screen); | ||
406 | 54 | terminal_screen_update_misc_cursor_shape (screen); | ||
407 | 55 | terminal_screen_update_misc_mouse_autohide (screen); | ||
408 | 56 | + terminal_screen_update_scrolling_alternate (screen); | ||
409 | 57 | terminal_screen_update_scrolling_bar (screen); | ||
410 | 58 | terminal_screen_update_scrolling_lines (screen); | ||
411 | 59 | terminal_screen_update_scrolling_on_output (screen); | ||
412 | 60 | @@ -950,6 +953,16 @@ | ||
413 | 61 | |||
414 | 62 | |||
415 | 63 | static void | ||
416 | 64 | +terminal_screen_update_scrolling_alternate (TerminalScreen *screen) | ||
417 | 65 | +{ | ||
418 | 66 | + gboolean scroll; | ||
419 | 67 | + g_object_get (G_OBJECT (screen->preferences), "misc-scroll-alternate-screen", &scroll, NULL); | ||
420 | 68 | + vte_terminal_set_alternate_screen_scroll (VTE_TERMINAL (screen->terminal), scroll); | ||
421 | 69 | +} | ||
422 | 70 | + | ||
423 | 71 | + | ||
424 | 72 | + | ||
425 | 73 | +static void | ||
426 | 74 | terminal_screen_update_scrolling_bar (TerminalScreen *screen) | ||
427 | 75 | { | ||
428 | 76 | TerminalScrollbar scrollbar; | ||
429 | 77 | |||
430 | 0 | 78 | ||
431 | === modified file 'debian/patches/series' | |||
432 | --- debian/patches/series 2012-04-05 20:07:06 +0000 | |||
433 | +++ debian/patches/series 2012-09-20 16:50:23 +0000 | |||
434 | @@ -1,1 +1,2 @@ | |||
435 | 1 | xubuntu_fix-invalid-anchor.patch | 1 | xubuntu_fix-invalid-anchor.patch |
436 | 2 | scroll-alternate-src-togglable.patch | ||
437 | 2 | 3 | ||
438 | === modified file 'terminal/terminal-dialogs.c' | |||
439 | --- terminal/terminal-dialogs.c 2012-04-05 20:07:06 +0000 | |||
440 | +++ terminal/terminal-dialogs.c 2012-09-20 16:50:23 +0000 | |||
441 | @@ -285,14 +285,7 @@ | |||
442 | 285 | /* build the full uri, fallback to online docs if nothing was found */ | 285 | /* build the full uri, fallback to online docs if nothing was found */ |
443 | 286 | if (G_LIKELY (exists)) | 286 | if (G_LIKELY (exists)) |
444 | 287 | { | 287 | { |
453 | 288 | if (offset) | 288 | uri = g_strconcat ("file://", filename, "#", offset, NULL); |
446 | 289 | { | ||
447 | 290 | uri = g_strconcat ("file://", filename, "#", offset, NULL); | ||
448 | 291 | } | ||
449 | 292 | else | ||
450 | 293 | { | ||
451 | 294 | uri = g_strconcat ("file://", filename, NULL); | ||
452 | 295 | } | ||
454 | 296 | } | 289 | } |
455 | 297 | else if (terminal_dialogs_show_help_ask_online (parent)) | 290 | else if (terminal_dialogs_show_help_ask_online (parent)) |
456 | 298 | { | 291 | { |
Hi RaduStoica, and thanks for trying to help out!
I gave your merge proposal a quick review as part of the patch pilot program. And I noticed something strange while doing so - your commit does not only add the patch but also applies it, which means changes to files outside the debian directory.
Looking a bit back in history, it seems you're not the only one who has done this. As such I think it would make the most sense to do two commits: the first would just unapply all patches (to correct the previous stuff), the second one would add your patch without applying it (i e, only changes to debian/changelog, debian/ patches/ series and debian/ patches/ scroll- alternate- src-togglable. patch).
The actual patch content looks okay to me so hopefully it can be merged (by somebody with the appropriate upload rights, which I don't have) after that.