Merge lp:~darkxst/ubuntu/saucy/gnome-panel/lp1184812 into lp:ubuntu/saucy/gnome-panel

Proposed by Tim Lunn
Status: Merged
Merge reported by: Luke Yelavich
Merged at revision: not available
Proposed branch: lp:~darkxst/ubuntu/saucy/gnome-panel/lp1184812
Merge into: lp:ubuntu/saucy/gnome-panel
Diff against target: 565 lines (+540/-0)
4 files modified
debian/changelog (+7/-0)
debian/patches/clock_applet_needs_terminal.patch (+358/-0)
debian/patches/git_panel_run_dialog_resurrect_terminal.patch (+173/-0)
debian/patches/series (+2/-0)
To merge this branch: bzr merge lp:~darkxst/ubuntu/saucy/gnome-panel/lp1184812
Reviewer Review Type Date Requested Status
Jeremy Bícha Approve
Ubuntu branches Pending
Review via email: mp+166003@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jeremy Bícha (jbicha) wrote :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-12-18 13:23:10 +0000
3+++ debian/changelog 2013-05-28 10:11:50 +0000
4@@ -1,3 +1,10 @@
5+gnome-panel (1:3.6.2-0ubuntu4) saucy; urgency=low
6+
7+ * Rebuild for gnome-desktop 3.8 transition (LP: #1184812)
8+ - debian/patches/git_panel_run_dialog_resurrect_terminal.patch
9+ clock_applet_needs_terminal.patch
10+ -- Tim Lunn <tim@feathertop.org> Tue, 28 May 2013 11:55:23 +1000
11+
12 gnome-panel (1:3.6.2-0ubuntu3) raring; urgency=low
13
14 [ Alberts Muktupāvels ]
15
16=== added file 'debian/patches/clock_applet_needs_terminal.patch'
17--- debian/patches/clock_applet_needs_terminal.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/clock_applet_needs_terminal.patch 2013-05-28 10:11:50 +0000
19@@ -0,0 +1,358 @@
20+This patches over git_panel_run_dialog_resurrect_terminal.patch and provides a common
21+function since this applet also needs the prepend_terminal command.
22+
23+
24+--- a/applets/clock/calendar-window.c
25++++ b/applets/clock/calendar-window.c
26+@@ -43,7 +43,8 @@
27+ #include <gio/gio.h>
28+
29+ #define GNOME_DESKTOP_USE_UNSTABLE_API
30+-#include <libgnome-desktop/gnome-desktop-utils.h>
31++
32++#include "panel-launch.h"
33+
34+ #include "calendar-window.h"
35+
36+@@ -190,7 +191,7 @@
37+ error = NULL;
38+
39+ if (terminal)
40+- gnome_desktop_prepend_terminal_to_vector (&argc, &argv);
41++ panel_util_desktop_prepend_terminal_to_vector (&argc, &argv);
42+
43+ display = gdk_screen_make_display_name (screen);
44+
45+--- a/gnome-panel/panel-run-dialog.c
46++++ b/gnome-panel/panel-run-dialog.c
47+@@ -47,6 +47,7 @@
48+ #include <libpanel-util/panel-glib.h>
49+ #include <libpanel-util/panel-gtk.h>
50+ #include <libpanel-util/panel-keyfile.h>
51++#include <libpanel-util/panel-launch.h>
52+ #include <libpanel-util/panel-show.h>
53+ #include <libpanel-util/panel-xdg.h>
54+
55+@@ -335,136 +336,6 @@
56+ }
57+
58+
59+-/**
60+- * gnome_desktop_prepend_terminal_to_vector:
61+- * @argc: a pointer to the vector size
62+- * @argv: a pointer to the vector
63+- *
64+- * Description: Prepends a terminal (either the one configured as default in
65+- * the user's GNOME setup, or one of the common xterm emulators) to the passed
66+- * in vector, modifying it in the process. The vector should be allocated with
67+- * #g_malloc, as this will #g_free the original vector. Also all elements must
68+- * have been allocated separately. That is the standard glib/GNOME way of
69+- * doing vectors however. If the integer that @argc points to is negative, the
70+- * size will first be computed. Also note that passing in pointers to a vector
71+- * that is empty, will just create a new vector for you.
72+- **/
73+-static void
74+-gnome_desktop_prepend_terminal_to_vector (int *argc, char ***argv)
75+-{
76+-#ifndef G_OS_WIN32
77+- char **real_argv;
78+- int real_argc;
79+- int i, j;
80+- char **term_argv = NULL;
81+- int term_argc = 0;
82+- GSettings *settings;
83+-
84+- gchar *terminal = NULL;
85+-
86+- char **the_argv;
87+-
88+- g_return_if_fail (argc != NULL);
89+- g_return_if_fail (argv != NULL);
90+-
91+- // _gnome_desktop_init_i18n ();
92+-
93+- /* sanity */
94+- if(*argv == NULL)
95+- *argc = 0;
96+-
97+- the_argv = *argv;
98+-
99+- /* compute size if not given */
100+- if (*argc < 0) {
101+- for (i = 0; the_argv[i] != NULL; i++)
102+- ;
103+- *argc = i;
104+- }
105+-
106+- settings = g_settings_new ("org.gnome.desktop.default-applications.terminal");
107+- terminal = g_settings_get_string (settings, "exec");
108+-
109+- if (terminal) {
110+- gchar *command_line;
111+- gchar *exec_flag;
112+-
113+- exec_flag = g_settings_get_string (settings, "exec-arg");
114+-
115+- if (exec_flag == NULL)
116+- command_line = g_strdup (terminal);
117+- else
118+- command_line = g_strdup_printf ("%s %s", terminal,
119+- exec_flag);
120+-
121+- g_shell_parse_argv (command_line,
122+- &term_argc,
123+- &term_argv,
124+- NULL /* error */);
125+-
126+- g_free (command_line);
127+- g_free (exec_flag);
128+- g_free (terminal);
129+- }
130+-
131+- g_object_unref (settings);
132+-
133+- if (term_argv == NULL) {
134+- char *check;
135+-
136+- term_argc = 2;
137+- term_argv = g_new0 (char *, 3);
138+-
139+- check = g_find_program_in_path ("gnome-terminal");
140+- if (check != NULL) {
141+- term_argv[0] = check;
142+- /* Note that gnome-terminal takes -x and
143+- * as -e in gnome-terminal is broken we use that. */
144+- term_argv[1] = g_strdup ("-x");
145+- } else {
146+- if (check == NULL)
147+- check = g_find_program_in_path ("nxterm");
148+- if (check == NULL)
149+- check = g_find_program_in_path ("color-xterm");
150+- if (check == NULL)
151+- check = g_find_program_in_path ("rxvt");
152+- if (check == NULL)
153+- check = g_find_program_in_path ("xterm");
154+- if (check == NULL)
155+- check = g_find_program_in_path ("dtterm");
156+- if (check == NULL) {
157+- g_warning (_("Cannot find a terminal, using "
158+- "xterm, even if it may not work"));
159+- check = g_strdup ("xterm");
160+- }
161+- term_argv[0] = check;
162+- term_argv[1] = g_strdup ("-e");
163+- }
164+- }
165+-
166+- real_argc = term_argc + *argc;
167+- real_argv = g_new (char *, real_argc + 1);
168+-
169+- for (i = 0; i < term_argc; i++)
170+- real_argv[i] = term_argv[i];
171+-
172+- for (j = 0; j < *argc; j++, i++)
173+- real_argv[i] = (char *)the_argv[j];
174+-
175+- real_argv[i] = NULL;
176+-
177+- g_free (*argv);
178+- *argv = real_argv;
179+- *argc = real_argc;
180+-
181+- /* we use g_free here as we sucked all the inner strings
182+- * out from it into real_argv */
183+- g_free (term_argv);
184+-#else
185+- /* FIXME: Implement when needed */
186+- g_warning ("gnome_prepend_terminal_to_vector: Not implemented");
187+-#endif
188+-}
189+
190+ static gboolean
191+ panel_run_dialog_launch_command (PanelRunDialog *dialog,
192+@@ -485,7 +356,7 @@
193+ screen = gtk_window_get_screen (GTK_WINDOW (dialog->run_dialog));
194+
195+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->terminal_checkbox)))
196+- gnome_desktop_prepend_terminal_to_vector (&argc, &argv);
197++ panel_util_desktop_prepend_terminal_to_vector (&argc, &argv);
198+
199+ display = gdk_screen_make_display_name (screen);
200+
201+--- a/gnome-panel/libpanel-util/panel-launch.c
202++++ b/gnome-panel/libpanel-util/panel-launch.c
203+@@ -280,3 +280,135 @@
204+ return _panel_launch_handle_error (fallback_exec,
205+ screen, local_error, error);
206+ }
207++
208++/**
209++ * panel_util_desktop_prepend_terminal_to_vector:
210++ * @argc: a pointer to the vector size
211++ * @argv: a pointer to the vector
212++ *
213++ * Description: Prepends a terminal (either the one configured as default in
214++ * the user's GNOME setup, or one of the common xterm emulators) to the passed
215++ * in vector, modifying it in the process. The vector should be allocated with
216++ * #g_malloc, as this will #g_free the original vector. Also all elements must
217++ * have been allocated separately. That is the standard glib/GNOME way of
218++ * doing vectors however. If the integer that @argc points to is negative, the
219++ * size will first be computed. Also note that passing in pointers to a vector
220++ * that is empty, will just create a new vector for you.
221++ **/
222++void
223++panel_util_desktop_prepend_terminal_to_vector (int *argc, char ***argv)
224++{
225++#ifndef G_OS_WIN32
226++ char **real_argv;
227++ int real_argc;
228++ int i, j;
229++ char **term_argv = NULL;
230++ int term_argc = 0;
231++ GSettings *settings;
232++
233++ gchar *terminal = NULL;
234++
235++ char **the_argv;
236++
237++ g_return_if_fail (argc != NULL);
238++ g_return_if_fail (argv != NULL);
239++
240++ // _gnome_desktop_init_i18n ();
241++
242++ /* sanity */
243++ if(*argv == NULL)
244++ *argc = 0;
245++
246++ the_argv = *argv;
247++
248++ /* compute size if not given */
249++ if (*argc < 0) {
250++ for (i = 0; the_argv[i] != NULL; i++)
251++ ;
252++ *argc = i;
253++ }
254++
255++ settings = g_settings_new ("org.gnome.desktop.default-applications.terminal");
256++ terminal = g_settings_get_string (settings, "exec");
257++
258++ if (terminal) {
259++ gchar *command_line;
260++ gchar *exec_flag;
261++
262++ exec_flag = g_settings_get_string (settings, "exec-arg");
263++
264++ if (exec_flag == NULL)
265++ command_line = g_strdup (terminal);
266++ else
267++ command_line = g_strdup_printf ("%s %s", terminal,
268++ exec_flag);
269++
270++ g_shell_parse_argv (command_line,
271++ &term_argc,
272++ &term_argv,
273++ NULL /* error */);
274++
275++ g_free (command_line);
276++ g_free (exec_flag);
277++ g_free (terminal);
278++ }
279++
280++ g_object_unref (settings);
281++
282++ if (term_argv == NULL) {
283++ char *check;
284++
285++ term_argc = 2;
286++ term_argv = g_new0 (char *, 3);
287++
288++ check = g_find_program_in_path ("gnome-terminal");
289++ if (check != NULL) {
290++ term_argv[0] = check;
291++ /* Note that gnome-terminal takes -x and
292++ * as -e in gnome-terminal is broken we use that. */
293++ term_argv[1] = g_strdup ("-x");
294++ } else {
295++ if (check == NULL)
296++ check = g_find_program_in_path ("nxterm");
297++ if (check == NULL)
298++ check = g_find_program_in_path ("color-xterm");
299++ if (check == NULL)
300++ check = g_find_program_in_path ("rxvt");
301++ if (check == NULL)
302++ check = g_find_program_in_path ("xterm");
303++ if (check == NULL)
304++ check = g_find_program_in_path ("dtterm");
305++ if (check == NULL) {
306++ g_warning (_("Cannot find a terminal, using "
307++ "xterm, even if it may not work"));
308++ check = g_strdup ("xterm");
309++ }
310++ term_argv[0] = check;
311++ term_argv[1] = g_strdup ("-e");
312++ }
313++ }
314++
315++ real_argc = term_argc + *argc;
316++ real_argv = g_new (char *, real_argc + 1);
317++
318++ for (i = 0; i < term_argc; i++)
319++ real_argv[i] = term_argv[i];
320++
321++ for (j = 0; j < *argc; j++, i++)
322++ real_argv[i] = (char *)the_argv[j];
323++
324++ real_argv[i] = NULL;
325++
326++ g_free (*argv);
327++ *argv = real_argv;
328++ *argc = real_argc;
329++
330++ /* we use g_free here as we sucked all the inner strings
331++ * out from it into real_argv */
332++ g_free (term_argv);
333++#else
334++ /* FIXME: Implement when needed */
335++ g_warning ("gnome_prepend_terminal_to_vector: Not implemented");
336++#endif
337++}
338++
339+--- a/gnome-panel/libpanel-util/panel-launch.h
340++++ b/gnome-panel/libpanel-util/panel-launch.h
341+@@ -56,6 +56,8 @@
342+ GdkScreen *screen,
343+ GError **error);
344+
345++void panel_util_desktop_prepend_terminal_to_vector (int *argc, char ***argv);
346++
347+ G_END_DECLS
348+
349+ #endif /* PANEL_LAUNCH_H */
350+--- a/applets/clock/Makefile.am
351++++ b/applets/clock/Makefile.am
352+@@ -52,12 +52,14 @@
353+ $(CLOCK_EDS_CFLAGS) \
354+ -I$(srcdir)/../../libpanel-applet \
355+ -I$(top_builddir)/libpanel-applet \
356++ -I$(top_builddir)/gnome-panel/libpanel-util \
357+ -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
358+ -DCLOCK_EDS_ICONDIR="\"$(CLOCK_EDS_ICONDIR)\"" \
359+ -DGWEATHER_I_KNOW_THIS_IS_UNSTABLE
360+
361+ CLOCK_LDADD = \
362+ ../../libpanel-applet/libpanel-applet-4.la \
363++ ../../gnome-panel/libpanel-util/libpanel-util.la \
364+ $(CLOCK_LIBS) \
365+ $(CLOCK_EDS_LIBS) \
366+ $(LIBPANEL_APPLET_LIBS) \
367+--- a/configure.ac
368++++ b/configure.ac
369+@@ -131,7 +131,7 @@
370+ AC_SUBST(TZ_CFLAGS)
371+ AC_SUBST(TZ_LIBS)
372+
373+-PKG_CHECK_MODULES(CLOCK, pango >= $PANGO_REQUIRED gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED librsvg-2.0 gweather-3.0 >= $GWEATHER_REQUIRED gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED)
374++PKG_CHECK_MODULES(CLOCK, pango >= $PANGO_REQUIRED gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED librsvg-2.0 gweather-3.0 >= $GWEATHER_REQUIRED gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED dconf >= $DCONF_REQUIRED)
375+ AC_SUBST(CLOCK_CFLAGS)
376+ AC_SUBST(CLOCK_LIBS)
377+
378
379=== added file 'debian/patches/git_panel_run_dialog_resurrect_terminal.patch'
380--- debian/patches/git_panel_run_dialog_resurrect_terminal.patch 1970-01-01 00:00:00 +0000
381+++ debian/patches/git_panel_run_dialog_resurrect_terminal.patch 2013-05-28 10:11:50 +0000
382@@ -0,0 +1,173 @@
383+From bf6af945130299a69a244afaee4eecbd3fb77233 Mon Sep 17 00:00:00 2001
384+From: Philipp Kaluza <phk@src.gnome.org>
385+Date: Fri, 08 Mar 2013 17:08:32 +0000
386+Subject: panel-run-dialog: resurrect function gnome_desktop_prepend_terminal_to_vector
387+
388+, which was removed from gnome-desktop in commit
389+9bab2144b7c8ace0c057720be3c48fb24a80a19d , and keep a local
390+copy in panel-run-dialog.c (simple helper function, static).
391+(Second half of fix for bug #237308 .)
392+---
393+diff --git a/gnome-panel/panel-run-dialog.c b/gnome-panel/panel-run-dialog.c
394+index 801b9bc..faf3d7e 100644
395+--- a/gnome-panel/panel-run-dialog.c
396++++ b/gnome-panel/panel-run-dialog.c
397+@@ -25,6 +25,7 @@
398+ * Havoc Pennington <hp@pobox.com>
399+ * George Lebl <jirka@5z.com>
400+ * Mark McLoughlin <mark@skynet.ie>
401++ * Tom Tromey (Copyright (C) 1998)
402+ */
403+
404+ #include <config.h>
405+@@ -42,8 +43,6 @@
406+ #include <gdk/gdkkeysyms.h>
407+ #include <gmenu-tree.h>
408+
409+-#include <libgnome-desktop/gnome-desktop-utils.h>
410+-
411+ #include <libpanel-util/panel-error.h>
412+ #include <libpanel-util/panel-glib.h>
413+ #include <libpanel-util/panel-gtk.h>
414+@@ -335,6 +334,138 @@ dummy_child_watch (GPid pid,
415+ */
416+ }
417+
418++
419++/**
420++ * gnome_desktop_prepend_terminal_to_vector:
421++ * @argc: a pointer to the vector size
422++ * @argv: a pointer to the vector
423++ *
424++ * Description: Prepends a terminal (either the one configured as default in
425++ * the user's GNOME setup, or one of the common xterm emulators) to the passed
426++ * in vector, modifying it in the process. The vector should be allocated with
427++ * #g_malloc, as this will #g_free the original vector. Also all elements must
428++ * have been allocated separately. That is the standard glib/GNOME way of
429++ * doing vectors however. If the integer that @argc points to is negative, the
430++ * size will first be computed. Also note that passing in pointers to a vector
431++ * that is empty, will just create a new vector for you.
432++ **/
433++static void
434++gnome_desktop_prepend_terminal_to_vector (int *argc, char ***argv)
435++{
436++#ifndef G_OS_WIN32
437++ char **real_argv;
438++ int real_argc;
439++ int i, j;
440++ char **term_argv = NULL;
441++ int term_argc = 0;
442++ GSettings *settings;
443++
444++ gchar *terminal = NULL;
445++
446++ char **the_argv;
447++
448++ g_return_if_fail (argc != NULL);
449++ g_return_if_fail (argv != NULL);
450++
451++ // _gnome_desktop_init_i18n ();
452++
453++ /* sanity */
454++ if(*argv == NULL)
455++ *argc = 0;
456++
457++ the_argv = *argv;
458++
459++ /* compute size if not given */
460++ if (*argc < 0) {
461++ for (i = 0; the_argv[i] != NULL; i++)
462++ ;
463++ *argc = i;
464++ }
465++
466++ settings = g_settings_new ("org.gnome.desktop.default-applications.terminal");
467++ terminal = g_settings_get_string (settings, "exec");
468++
469++ if (terminal) {
470++ gchar *command_line;
471++ gchar *exec_flag;
472++
473++ exec_flag = g_settings_get_string (settings, "exec-arg");
474++
475++ if (exec_flag == NULL)
476++ command_line = g_strdup (terminal);
477++ else
478++ command_line = g_strdup_printf ("%s %s", terminal,
479++ exec_flag);
480++
481++ g_shell_parse_argv (command_line,
482++ &term_argc,
483++ &term_argv,
484++ NULL /* error */);
485++
486++ g_free (command_line);
487++ g_free (exec_flag);
488++ g_free (terminal);
489++ }
490++
491++ g_object_unref (settings);
492++
493++ if (term_argv == NULL) {
494++ char *check;
495++
496++ term_argc = 2;
497++ term_argv = g_new0 (char *, 3);
498++
499++ check = g_find_program_in_path ("gnome-terminal");
500++ if (check != NULL) {
501++ term_argv[0] = check;
502++ /* Note that gnome-terminal takes -x and
503++ * as -e in gnome-terminal is broken we use that. */
504++ term_argv[1] = g_strdup ("-x");
505++ } else {
506++ if (check == NULL)
507++ check = g_find_program_in_path ("nxterm");
508++ if (check == NULL)
509++ check = g_find_program_in_path ("color-xterm");
510++ if (check == NULL)
511++ check = g_find_program_in_path ("rxvt");
512++ if (check == NULL)
513++ check = g_find_program_in_path ("xterm");
514++ if (check == NULL)
515++ check = g_find_program_in_path ("dtterm");
516++ if (check == NULL) {
517++ g_warning (_("Cannot find a terminal, using "
518++ "xterm, even if it may not work"));
519++ check = g_strdup ("xterm");
520++ }
521++ term_argv[0] = check;
522++ term_argv[1] = g_strdup ("-e");
523++ }
524++ }
525++
526++ real_argc = term_argc + *argc;
527++ real_argv = g_new (char *, real_argc + 1);
528++
529++ for (i = 0; i < term_argc; i++)
530++ real_argv[i] = term_argv[i];
531++
532++ for (j = 0; j < *argc; j++, i++)
533++ real_argv[i] = (char *)the_argv[j];
534++
535++ real_argv[i] = NULL;
536++
537++ g_free (*argv);
538++ *argv = real_argv;
539++ *argc = real_argc;
540++
541++ /* we use g_free here as we sucked all the inner strings
542++ * out from it into real_argv */
543++ g_free (term_argv);
544++#else
545++ /* FIXME: Implement when needed */
546++ g_warning ("gnome_prepend_terminal_to_vector: Not implemented");
547++#endif
548++}
549++
550+ static gboolean
551+ panel_run_dialog_launch_command (PanelRunDialog *dialog,
552+ const char *command,
553+--
554+cgit v0.9.1
555+
556
557=== modified file 'debian/patches/series'
558--- debian/patches/series 2012-12-03 22:12:43 +0000
559+++ debian/patches/series 2013-05-28 10:11:50 +0000
560@@ -8,3 +8,5 @@
561 85_disable_shutdown_on_ltsp.patch
562 90-remove_artifact_on_icon_animation.patch
563 fix-for-1083811.patch
564+git_panel_run_dialog_resurrect_terminal.patch
565+clock_applet_needs_terminal.patch

Subscribers

People subscribed via source and target branches

to all changes: