1 diff -ur parole-0.2.0.6.orig/configure.ac parole-0.2.0.6/configure.ac
2 --- parole-0.2.0.6.orig/configure.ac 2011-04-17 13:54:13.000000000 +0200
3 +++ parole-0.2.0.6/configure.ac 2011-09-28 13:38:01.415723354 +0200
5 m4_define([dbus_minimum_version], [0.60])
6 m4_define([dbus_glib_minimum_version], [0.70])
8 -m4_define([libxfcegui4_minimum_version],[4.6.0])
9 +m4_define([libxfce4ui_minimum_version],[4.8.0])
10 m4_define([libxfce4util_minimum_version],[4.6.0])
12 m4_define([libnotify_minimum_version], [0.4.1])
14 XDT_CHECK_PACKAGE([DBUS], [dbus-1], [dbus_minimum_version])
15 XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [dbus_glib_minimum_version])
17 -XDT_CHECK_PACKAGE([LIBXFCE4GUI], [libxfcegui4-1.0],[libxfcegui4_minimum_version])
18 +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1],[libxfce4ui_minimum_version])
19 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],[libxfce4util_minimum_version])
21 #=======================================================#
22 diff -ur parole-0.2.0.6.orig/gst/Makefile.am parole-0.2.0.6/gst/Makefile.am
23 --- parole-0.2.0.6.orig/gst/Makefile.am 2011-04-17 13:53:19.000000000 +0200
24 +++ parole-0.2.0.6/gst/Makefile.am 2011-09-28 13:38:01.415723354 +0200
28 libparolegst_la_CFLAGS = \
31 $(GST_INTERFACES_CFLAGS) \
33 - $(LIBXFCE4GUI_CFLAGS)
34 + $(LIBXFCE4UI_CFLAGS)
36 libparolegst_la_LIBADD = \
37 $(top_builddir)/parole/libparole.la\
38 diff -ur parole-0.2.0.6.orig/gst/parole-gst.c parole-0.2.0.6/gst/parole-gst.c
39 --- parole-0.2.0.6.orig/gst/parole-gst.c 2011-04-17 13:53:19.000000000 +0200
40 +++ parole-0.2.0.6/gst/parole-gst.c 2011-09-28 13:38:01.415723354 +0200
42 #undef XFCE_DISABLE_DEPRECATED
44 #include <libxfce4util/libxfce4util.h>
45 -#include <libxfcegui4/libxfcegui4.h>
46 +#include <libxfce4ui/libxfce4ui.h>
51 if ( gst->priv->state != gst->priv->target )
54 - xfce_confirm (_("The stream is taking too much time to load"), GTK_STOCK_OK, _("Stop"));
55 + xfce_dialog_confirm(NULL, GTK_STOCK_OK, _("Stop"), NULL, _("The stream is taking too much time to load"));
61 if ( G_UNLIKELY (gst->priv->playbin == NULL) )
63 - xfce_err (_("Unable to load playbin GStreamer plugin"
64 + xfce_dialog_show_error (NULL, NULL, _("Unable to load playbin GStreamer plugin"
65 ", check your GStreamer installation"));
67 g_error ("playbin load failed");
70 if ( G_UNLIKELY (gst->priv->video_sink == NULL) )
72 - xfce_err (_("Unable to load video GStreamer plugin"
73 + xfce_dialog_show_error (NULL, NULL, _("Unable to load video GStreamer plugin"
74 ", check your GStreamer installation"));
75 g_error ("ximagesink load failed");
77 diff -ur parole-0.2.0.6.orig/plugins/tray/Makefile.am parole-0.2.0.6/plugins/tray/Makefile.am
78 --- parole-0.2.0.6.orig/plugins/tray/Makefile.am 2011-04-17 13:53:19.000000000 +0200
79 +++ parole-0.2.0.6/plugins/tray/Makefile.am 2011-09-28 13:38:01.419056688 +0200
81 tray_icon_la_CFLAGS = \
84 - $(LIBXFCE4GUI_CFLAGS) \
85 + $(LIBXFCE4UI_CFLAGS) \
86 $(LIBXFCE4UTIL_CFLAGS) \
94 \ No newline at end of file
96 diff -ur parole-0.2.0.6.orig/plugins/tray/tray-provider.c parole-0.2.0.6/plugins/tray/tray-provider.c
97 --- parole-0.2.0.6.orig/plugins/tray/tray-provider.c 2011-04-17 13:53:19.000000000 +0200
98 +++ parole-0.2.0.6/plugins/tray/tray-provider.c 2011-09-28 13:39:06.435726288 +0200
102 #include <libxfce4util/libxfce4util.h>
103 -#include <libxfcegui4/libxfcegui4.h>
104 +#include <libxfce4ui/libxfce4ui.h>
106 #include "tray-provider.h"
108 diff -ur parole-0.2.0.6.orig/src/main.c parole-0.2.0.6/src/main.c
109 --- parole-0.2.0.6.orig/src/main.c 2011-04-17 13:53:19.000000000 +0200
110 +++ parole-0.2.0.6/src/main.c 2011-09-28 13:38:01.419056688 +0200
113 builder = parole_builder_get_main_interface ();
114 parole_dbus_register_name (PAROLE_DBUS_NAME);
115 - session = parole_session_get ();
116 + session = parole_session_get (client_id);
119 - parole_session_set_client_id (session, client_id);
121 - parole_session_real_init (session);
122 player = parole_player_new ();
125 diff -ur parole-0.2.0.6.orig/src/Makefile.am parole-0.2.0.6/src/Makefile.am
126 --- parole-0.2.0.6.orig/src/Makefile.am 2011-04-17 13:53:19.000000000 +0200
127 +++ parole-0.2.0.6/src/Makefile.am 2011-09-28 13:38:01.419056688 +0200
129 -DPAROLE_PLUGINS_DIR=\"$(libdir)/parole-$(PAROLE_VERSION_API)\"\
130 -DPAROLE_PLUGINS_DATA_DIR=\"$(datadir)/parole/parole-plugins-$(PAROLE_VERSION_API)\"\
131 -DPAROLE_COMPILATION \
136 $(DBUS_GLIB_CFLAGS) \
137 - $(LIBXFCE4GUI_CFLAGS) \
138 + $(LIBXFCE4UI_CFLAGS) \
139 $(GST_VIDEO_CFLAGS) \
140 $(GST_INTERFACES_CFLAGS) \
143 $(top_builddir)/gst/libparolegst.la \
144 $(top_builddir)/common/libparolecommon.la\
145 $(top_builddir)/common/libparolescreensaver.la\
151 - $(LIBXFCE4GUI_LIBS) \
152 + $(LIBXFCE4UI_LIBS) \
154 $(GST_INTERFACES_LIBS) \
156 diff -ur parole-0.2.0.6.orig/src/parole-about.c parole-0.2.0.6/src/parole-about.c
157 --- parole-0.2.0.6.orig/src/parole-about.c 2011-04-17 13:53:19.000000000 +0200
158 +++ parole-0.2.0.6/src/parole-about.c 2011-09-28 13:42:35.262402377 +0200
160 #undef XFCE_DISABLE_DEPRECATED
162 #include <libxfce4util/libxfce4util.h>
163 -#include <libxfcegui4/libxfcegui4.h>
164 +#include <libxfce4ui/libxfce4ui.h>
166 #include "parole-about.h"
167 #include "parole-utils.h"
169 void parole_about (void)
171 - XfceAboutInfo *info;
177 - static const struct
179 - gchar *name, *email, *language;
183 - {"astur", "malditoastur@gmail.com", "ast",},
184 - {"Carles Muñoz Gorriz", "carlesmu@internautas.org", "ca.po",},
185 - {"Per Kongstad", "p_kongstad@op.pl", "da.po",},
186 - {"Christoph Wickert", "cwickert@fedoraproject.org", "de.po",},
187 - {"elega", "elega@elega.com.ar","es",},
188 - {"Piarres Beobide", "pi+debian@beobide.net", "eu",},
189 - {"Douart Patrick", "patrick.2@laposte.net", "fr",},
190 - {"Leandro Regueiro", "leandro.regueiro@gmail.com", "gl",},
191 - {"Andhika Padmawan", "andhika.padmawan@gmail.com", "id",},
192 - {"Masato Hashimoto", "cabezon.hashimoto@gmail.com", "ja",},
193 - {"Rihards Prieditis", "rprieditis@gmail.com", "lv",},
194 - {"Mario Blättermann", "mariobl@gnome.org", "nl",},
195 - {"Sérgio Marques", "smarquespt@gmail.com", "pt",},
196 - {"Vlad Vasilev", "lortwer@gmail.com", "ru",},
197 - {"Robert Hartl", "hartl.robert@gmail.com", "sk",},
198 - {"Samed Beyribey", "ras0ir@eventualis.org", "tr",},
199 - {"Motsyo Gennadi", "drool@altlinux.ru", "uk",},
200 - {"Hunt Xu", "huntxu@live.cn", "zh_CN",},
204 - info = xfce_about_info_new ("Parole", VERSION, _("Parole Media Player"),
205 - XFCE_COPYRIGHT_TEXT ("2009-2011", "Ali Abdallah"),
208 - xfce_about_info_set_homepage (info, "http://goodies.xfce.org/projects/applications/parole");
209 - xfce_about_info_add_credit (info, "Ali Abdallah", "aliov@xfce.org", _("Author/Maintainer"));
212 - for (n = 0; n < G_N_ELEMENTS (translators); ++n)
215 - s = g_strdup_printf (_("Translator (%s)"), translators[n].language);
216 - xfce_about_info_add_credit (info, translators[n].name, translators[n].email, s);
219 + static gchar *translators =
220 + "astur <malditoastur@gmail.com> ast\n"
221 + "Carles Muñoz Gorriz <carlesmu@internautas.org> ca.po\n"
222 + "Per Kongstad <p_kongstad@op.pl> da.po\n"
223 + "Christoph Wickert <cwickert@fedoraproject.org> de.po\n"
224 + "elega <elega@elega.com.ar> es\n"
225 + "Piarres Beobide <pi+debian@beobide.net> eu\n"
226 + "Douart Patrick <patrick.2@laposte.net> fr\n"
227 + "Leandro Regueiro <leandro.regueiro@gmail.com> gl\n"
228 + "Andhika Padmawan <andhika.padmawan@gmail.com> id\n"
229 + "Masato Hashimoto <cabezon.hashimoto@gmail.com> ja\n"
230 + "Rihards Prieditis <rprieditis@gmail.com> lv\n"
231 + "Mario Blättermann <mariobl@gnome.org> nl\n"
232 + "Sérgio Marques <smarquespt@gmail.com> pt\n"
233 + "Vlad Vasilev <lortwer@gmail.com> ru\n"
234 + "Robert Hartl <hartl.robert@gmail.com> sk\n"
235 + "Samed Beyribey <ras0ir@eventualis.org> tr\n"
236 + "Motsyo Gennadi <drool@altlinux.ru> uk\n"
237 + "Hunt Xu <huntxu@live.cn> zh_CN\n";
239 + const gchar *auth[] = { "Ali Abdallah <aliov@xfce.org> Author/Maintainer", NULL };
241 gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &x, &y);
242 icon = parole_icon_load ("parole", x);
244 - dialog = xfce_about_dialog_new_with_values (NULL, info, icon);
247 - gtk_dialog_run (GTK_DIALOG (dialog));
248 - gtk_widget_destroy (dialog);
250 - xfce_about_info_free (info);
254 +#if !GTK_CHECK_VERSION (2, 18, 0)
255 + gtk_about_dialog_set_email_hook (exo_gtk_url_about_dialog_hook, NULL, NULL);
256 + gtk_about_dialog_set_url_hook (exo_gtk_url_about_dialog_hook, NULL, NULL);
258 + gtk_show_about_dialog(NULL,
260 + "program-name", "Parole",
261 + "license", xfce_get_license_text (XFCE_LICENSE_TEXT_GPL),
262 + "version", VERSION,
263 + "comments", _("Parole Media Player"),
264 + "website", "http://goodies.xfce.org/projects/applications/parole",
265 + "copyright", _("Copyright (c) 2009-2011 Ali Abdallah\n"),
267 + "translator-credits", translators, NULL);
270 g_object_unref (G_OBJECT (icon));
272 diff -ur parole-0.2.0.6.orig/src/parole-player.c parole-0.2.0.6/src/parole-player.c
273 --- parole-0.2.0.6.orig/src/parole-player.c 2011-04-17 13:53:30.000000000 +0200
274 +++ parole-0.2.0.6/src/parole-player.c 2011-09-28 13:44:05.459073112 +0200
276 #ifdef HAVE_XF86_KEYSYM
277 #include <X11/XF86keysym.h>
279 +#include <X11/Xatom.h>
281 #include <gdk/gdkx.h>
282 #include <gdk/gdkkeysyms.h>
284 #undef XFCE_DISABLE_DEPRECATED
286 #include <libxfce4util/libxfce4util.h>
287 -#include <libxfcegui4/libxfcegui4.h>
288 +#include <libxfce4ui/libxfce4ui.h>
290 #include <dbus/dbus-glib.h>
294 parole_player_error_cb (ParoleGst *gst, const gchar *error, ParolePlayer *player)
296 - xfce_err ("%s", error);
297 + xfce_dialog_show_error (NULL, NULL, "%s", error);
298 parole_screen_saver_uninhibit (player->priv->screen_saver);
299 parole_player_stopped (player);
301 @@ -1702,13 +1703,6 @@
305 -parole_player_session_die_cb (ParolePlayer *player)
307 - player->priv->exit = TRUE;
308 - parole_gst_terminate (PAROLE_GST (player->priv->gst));
312 parole_gst_set_default_aspect_ratio (ParolePlayer *player, GtkBuilder *builder)
314 ParoleAspectRatio ratio;
315 @@ -1891,10 +1885,7 @@
316 g_signal_connect_swapped (player->priv->conf, "notify::reset-saver",
317 G_CALLBACK (parole_player_reset_saver_changed_cb), player);
319 - player->priv->session = parole_session_get ();
321 - g_signal_connect_swapped (player->priv->session, "die",
322 - G_CALLBACK (parole_player_session_die_cb), player);
323 + player->priv->session = parole_session_get (NULL);
325 player->priv->gst = parole_gst_new (FALSE, player->priv->conf);
327 diff -ur parole-0.2.0.6.orig/src/parole-plugins-manager.c parole-0.2.0.6/src/parole-plugins-manager.c
328 --- parole-0.2.0.6.orig/src/parole-plugins-manager.c 2011-04-17 13:53:19.000000000 +0200
329 +++ parole-0.2.0.6/src/parole-plugins-manager.c 2011-09-28 13:38:01.422390022 +0200
331 #undef XFCE_DISABLE_DEPRECATED
333 #include <libxfce4util/libxfce4util.h>
334 -#include <libxfcegui4/libxfcegui4.h>
335 +#include <libxfce4ui/libxfce4ui.h>
337 #include <parole/parole-provider-plugin.h>
341 if ( manager->priv->array->len == 0 )
343 - xfce_info ("%s", _("No installed plugins found on this system"));
344 + xfce_dialog_show_info(NULL, NULL, "%s", _("No installed plugins found on this system"));
348 diff -ur parole-0.2.0.6.orig/src/parole-session.c parole-0.2.0.6/src/parole-session.c
349 --- parole-0.2.0.6.orig/src/parole-session.c 2011-04-17 13:53:19.000000000 +0200
350 +++ parole-0.2.0.6/src/parole-session.c 2011-09-28 13:38:01.425723355 +0200
352 #undef XFCE_DISABLE_DEPRECATED
354 #include <libxfce4util/libxfce4util.h>
355 -#include <libxfcegui4/libxfcegui4.h>
356 +#include <libxfce4ui/libxfce4ui.h>
358 #include "parole-session.h"
362 struct ParoleSessionPrivate
364 - SessionClient *client;
366 + XfceSMClient *client;
377 G_DEFINE_TYPE (ParoleSession, parole_session, G_TYPE_OBJECT)
380 -parole_session_die (gpointer client_data)
382 - ParoleSession *session;
384 - session = parole_session_get ();
386 - if ( session->priv->managed )
387 - g_signal_emit (G_OBJECT (session), signals [DIE], 0);
391 parole_session_class_init (ParoleSessionClass *klass)
393 GObjectClass *object_class = G_OBJECT_CLASS (klass);
396 - g_signal_new ("die",
397 - PAROLE_TYPE_SESSION,
399 - G_STRUCT_OFFSET(ParoleSessionClass, die),
401 - g_cclosure_marshal_VOID__VOID,
402 - G_TYPE_NONE, 0, G_TYPE_NONE);
405 signals [SAVE_STATE] =
406 g_signal_new ("save-state",
409 session->priv = PAROLE_SESSION_GET_PRIVATE (session);
411 session->priv->client = NULL;
413 - session->priv->client = client_session_new_full (NULL,
414 - SESSION_RESTART_NEVER,
417 - (gchar *) PACKAGE_NAME,
425 - if ( G_UNLIKELY (session->priv->client == NULL ) )
427 - g_warning ("Failed to connect to session manager");
431 - session->priv->client->die = parole_session_die;
437 if ( session->priv->client != NULL )
439 - client_session_free (session->priv->client);
440 + g_object_unref (session->priv->client);
443 G_OBJECT_CLASS (parole_session_parent_class)->finalize (object);
447 -parole_session_get (void)
448 +parole_session_get (const gchar *client_id)
450 static gpointer parole_session_obj = NULL;
452 + ParoleSession *session = NULL;
453 + GError *error = NULL;
454 + gchar *current_dir;
456 + const gchar *restart_command[] =
463 if ( G_LIKELY (parole_session_obj != NULL ) )
465 g_object_ref (parole_session_obj);
469 - parole_session_obj = g_object_new (PAROLE_TYPE_SESSION, NULL);
470 + session = g_object_new (PAROLE_TYPE_SESSION, NULL);
471 + current_dir = g_get_current_dir ();
472 + session->priv->client = xfce_sm_client_get_full (XFCE_SM_CLIENT_RESTART_NORMAL,
473 + XFCE_SM_CLIENT_PRIORITY_DEFAULT,
477 + PACKAGE_NAME ".desktop");
478 + g_free (current_dir);
479 + session->priv->managed = xfce_sm_client_connect (session->priv->client, &error);
481 + if ( G_UNLIKELY (error) )
483 + g_warning ("Failed to connect to session manager : %s", error->message);
484 + g_error_free (error);
486 + parole_session_obj = session;
487 g_object_add_weak_pointer (parole_session_obj, &parole_session_obj);
490 return PAROLE_SESSION (parole_session_obj);
493 -void parole_session_real_init (ParoleSession *session)
495 - g_return_if_fail (PAROLE_IS_SESSION (session));
496 - g_return_if_fail (session->priv->managed == FALSE);
498 - session->priv->managed = session_init (session->priv->client);
501 -void parole_session_set_client_id (ParoleSession *session, const gchar *client_id)
503 - g_return_if_fail (PAROLE_IS_SESSION (session));
504 - g_return_if_fail (session->priv->managed == FALSE);
506 - if ( G_UNLIKELY (session->priv->client == NULL) )
509 - client_session_set_client_id (session->priv->client, client_id);
511 diff -ur parole-0.2.0.6.orig/src/parole-session.h parole-0.2.0.6/src/parole-session.h
512 --- parole-0.2.0.6.orig/src/parole-session.h 2011-04-17 13:53:19.000000000 +0200
513 +++ parole-0.2.0.6/src/parole-session.h 2011-09-28 13:38:01.425723355 +0200
516 GType parole_session_get_type (void) G_GNUC_CONST;
518 -ParoleSession *parole_session_get (void);
519 +ParoleSession *parole_session_get (const gchar *client_id);
521 -void parole_session_real_init (ParoleSession *session);
523 -void parole_session_set_client_id (ParoleSession *session,
524 - const gchar *client_id);
527 #endif /* __PAROLE_SESSION_H */
528 diff -ur parole-0.2.0.6.orig/src/parole-statusbar.c parole-0.2.0.6/src/parole-statusbar.c
529 --- parole-0.2.0.6.orig/src/parole-statusbar.c 2011-04-17 13:53:19.000000000 +0200
530 +++ parole-0.2.0.6/src/parole-statusbar.c 2011-09-28 13:38:01.425723355 +0200
535 -#include <libxfcegui4/libxfcegui4.h>
536 +#include <libxfce4ui/libxfce4ui.h>
538 #include "parole-builder.h"
539 #include "parole-statusbar.h"