Author: baggins                      Date: Fri Mar  4 13:20:12 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial revision

---- Files affected:
packages/parole:
   parole-ui.patch (NONE -> 1.1)  (NEW), parole.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/parole/parole-ui.patch
diff -u /dev/null packages/parole/parole-ui.patch:1.1
--- /dev/null   Fri Mar  4 14:20:12 2011
+++ packages/parole/parole-ui.patch     Fri Mar  4 14:20:07 2011
@@ -0,0 +1,620 @@
+diff -ur parole-0.2.0.2/browser-plugin/media-plugin/main.c 
parole-0.2.0.2-ui/browser-plugin/media-plugin/main.c
+--- parole-0.2.0.2/browser-plugin/media-plugin/main.c  2010-01-25 
12:50:28.000000000 +0100
++++ parole-0.2.0.2-ui/browser-plugin/media-plugin/main.c       2011-03-04 
13:58:01.000000000 +0100
+@@ -31,7 +31,7 @@
+ 
+ #include <gtk/gtk.h>
+ 
+-#include <libxfcegui4/libxfcegui4.h>
++#include <libxfce4ui/libxfce4ui.h>
+ 
+ #include <gst/gst.h>
+ 
+diff -ur parole-0.2.0.2/browser-plugin/media-plugin/Makefile.am 
parole-0.2.0.2-ui/browser-plugin/media-plugin/Makefile.am
+--- parole-0.2.0.2/browser-plugin/media-plugin/Makefile.am     2010-01-25 
12:22:07.000000000 +0100
++++ parole-0.2.0.2-ui/browser-plugin/media-plugin/Makefile.am  2011-03-04 
13:58:11.000000000 +0100
+@@ -22,7 +22,7 @@
+       $(GST_VIDEO_CFLAGS)                     \
+         $(GST_INTERFACES_CFLAGS)              \
+       $(DBUS_GLIB_CFLAGS)                     \
+-      $(LIBXFCE4GUI_CFLAGS)                   \
++      $(LIBXFCE4UI_CFLAGS)                    \
+       $(TAGLIBC_CFLAGS)
+ 
+ parole_media_plugin_LDADD =                   \
+@@ -34,7 +34,7 @@
+       $(GST_VIDEO_LIBS)                       \
+         $(GST_INTERFACES_LIBS)                        \
+       $(DBUS_GLIB_LIBS)                       \
+-      $(LIBXFCE4GUI_LIBS)                     \
++      $(LIBXFCE4UI_LIBS)                      \
+       $(TAGLIBC_LIBS)
+ 
+ if MAINTAINER_MODE
+@@ -48,4 +48,4 @@
+ endif
+ 
+ DISTCLEANFILES =                              \
+-      $(BUILT_SOURCES)
+\ No newline at end of file
++      $(BUILT_SOURCES)
+diff -ur parole-0.2.0.2/browser-plugin/media-plugin/parole-plugin-player.c 
parole-0.2.0.2-ui/browser-plugin/media-plugin/parole-plugin-player.c
+--- parole-0.2.0.2/browser-plugin/media-plugin/parole-plugin-player.c  
2010-01-25 12:50:01.000000000 +0100
++++ parole-0.2.0.2-ui/browser-plugin/media-plugin/parole-plugin-player.c       
2011-03-04 13:58:30.000000000 +0100
+@@ -31,7 +31,7 @@
+ #include <parole/parole.h>
+ 
+ #include <libxfce4util/libxfce4util.h>
+-#include <libxfcegui4/libxfcegui4.h>
++#include <libxfce4ui/libxfce4ui.h>
+ 
+ #include "parole-plugin-player.h"
+ 
+diff -ur parole-0.2.0.2/configure.ac parole-0.2.0.2-ui/configure.ac
+--- parole-0.2.0.2/configure.ac        2010-01-25 12:47:15.000000000 +0100
++++ parole-0.2.0.2-ui/configure.ac     2011-03-04 12:30:49.000000000 +0100
+@@ -78,7 +78,7 @@
+ m4_define([dbus_minimum_version], [0.60])
+ m4_define([dbus_glib_minimum_version], [0.70])
+ 
+-m4_define([libxfcegui4_minimum_version],[4.6.0])
++m4_define([libxfce4ui_minimum_version],[4.8.0])
+ m4_define([libxfce4util_minimum_version],[4.6.0])
+ 
+ m4_define([libnotify_minimum_version], [0.4.1])
+@@ -98,7 +98,7 @@
+ XDT_CHECK_PACKAGE([DBUS], [dbus-1], [dbus_minimum_version])
+ XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [dbus_glib_minimum_version])
+ 
+-XDT_CHECK_PACKAGE([LIBXFCE4GUI], 
[libxfcegui4-1.0],[libxfcegui4_minimum_version])
++XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1],[libxfce4ui_minimum_version])
+ XDT_CHECK_PACKAGE([LIBXFCE4UTIL], 
[libxfce4util-1.0],[libxfce4util_minimum_version])
+ 
+ #=======================================================#
+diff -ur parole-0.2.0.2/gst/Makefile.am parole-0.2.0.2-ui/gst/Makefile.am
+--- parole-0.2.0.2/gst/Makefile.am     2010-01-25 12:22:07.000000000 +0100
++++ parole-0.2.0.2-ui/gst/Makefile.am  2011-03-04 12:32:44.000000000 +0100
+@@ -23,10 +23,11 @@
+       parole-gst-iface.h
+       
+ libparolegst_la_CFLAGS =              \
++      $(GTK_CFLAGS)             \
+       $(GST_VIDEO_CFLAGS)             \
+         $(GST_INTERFACES_CFLAGS)      \
+       $(GTHREAD_CFLAGS)               \
+-      $(LIBXFCE4GUI_CFLAGS)
++      $(LIBXFCE4UI_CFLAGS)
+ 
+ libparolegst_la_LIBADD =              \
+       $(top_builddir)/parole/libparole.la\
+diff -ur parole-0.2.0.2/gst/parole-gst.c parole-0.2.0.2-ui/gst/parole-gst.c
+--- parole-0.2.0.2/gst/parole-gst.c    2010-01-25 12:22:07.000000000 +0100
++++ parole-0.2.0.2-ui/gst/parole-gst.c 2011-03-04 13:57:00.000000000 +0100
+@@ -34,7 +34,7 @@
+ #include <gst/video/video.h>
+ 
+ #include <libxfce4util/libxfce4util.h>
+-#include <libxfcegui4/libxfcegui4.h>
++#include <libxfce4ui/libxfce4ui.h>
+ 
+ #include <gdk/gdkx.h>
+ 
+@@ -1508,7 +1508,7 @@
+     if ( gst->priv->state != gst->priv->target )
+     {
+       gboolean ret_val = 
+-          xfce_confirm (_("The stream is taking too much time to load"), 
GTK_STOCK_OK, _("Stop"));
++          xfce_dialog_confirm(NULL, GTK_STOCK_OK, _("Stop"), NULL, _("The 
stream is taking too much time to load"));
+           
+       if ( ret_val )
+       {
+@@ -1697,7 +1697,7 @@
+  
+     if ( G_UNLIKELY (gst->priv->playbin == NULL) )
+     {
+-      xfce_err (_("Unable to load playbin GStreamer plugin"
++      xfce_dialog_show_error (NULL, NULL, _("Unable to load playbin GStreamer 
plugin"
+                   ", check your GStreamer installation"));
+                   
+       g_error ("playbin load failed");
+@@ -1717,7 +1717,7 @@
+       
+       if ( G_UNLIKELY (gst->priv->video_sink == NULL) )
+       {
+-          xfce_err (_("Unable to load video GStreamer plugin"
++          xfce_dialog_show_error (NULL, NULL, _("Unable to load video 
GStreamer plugin"
+                     ", check your GStreamer installation"));
+           g_error ("ximagesink load failed");
+       }
+diff -ur parole-0.2.0.2/plugins/tray/Makefile.am 
parole-0.2.0.2-ui/plugins/tray/Makefile.am
+--- parole-0.2.0.2/plugins/tray/Makefile.am    2010-01-25 12:22:07.000000000 
+0100
++++ parole-0.2.0.2-ui/plugins/tray/Makefile.am 2011-03-04 13:57:32.000000000 
+0100
+@@ -19,7 +19,7 @@
+ tray_icon_la_CFLAGS =                         \
+       $(PLATFORM_CFLAGS)                      \
+       $(GTK_CFLAGS)                           \
+-      $(LIBXFCE4GUI_CFLAGS)                   \
++      $(LIBXFCE4UI_CFLAGS)                    \
+       $(LIBXFCE4UTIL_CFLAGS)                  \
+       $(LIBNOTIFY_CFLAGS)
+ 
+@@ -44,4 +44,4 @@
+       $(desktop_in_files)
+     
+ DISTCLEANFILES =              \
+-      $(desktop_DATA)
+\ No newline at end of file
++      $(desktop_DATA)
+diff -ur parole-0.2.0.2/plugins/tray/tray-provider.c 
parole-0.2.0.2-ui/plugins/tray/tray-provider.c
+--- parole-0.2.0.2/plugins/tray/tray-provider.c        2010-01-25 
12:22:07.000000000 +0100
++++ parole-0.2.0.2-ui/plugins/tray/tray-provider.c     2011-03-04 
13:57:22.000000000 +0100
+@@ -31,7 +31,7 @@
+ #include <libnotify/notify.h>
+ #endif
+ 
+-#include <libxfcegui4/libxfcegui4.h>
++#include <libxfce4ui/libxfce4ui.h>
+ #include <libxfce4util/libxfce4util.h>
+ 
+ #include "tray-provider.h"
+diff -ur parole-0.2.0.2/src/main.c parole-0.2.0.2-ui/src/main.c
+--- parole-0.2.0.2/src/main.c  2010-01-25 12:22:07.000000000 +0100
++++ parole-0.2.0.2-ui/src/main.c       2011-03-04 13:32:16.000000000 +0100
+@@ -311,12 +311,8 @@
+     {
+       builder = parole_builder_get_main_interface ();
+       parole_dbus_register_name (PAROLE_DBUS_NAME);
+-      session = parole_session_get ();
++      session = parole_session_get (client_id);
+       
+-      if ( client_id )
+-          parole_session_set_client_id (session, client_id);
+-          
+-      parole_session_real_init (session);
+       player = parole_player_new ();
+ 
+       if ( filenames && filenames[0] != NULL )
+diff -ur parole-0.2.0.2/src/Makefile.am parole-0.2.0.2-ui/src/Makefile.am
+--- parole-0.2.0.2/src/Makefile.am     2010-01-25 12:22:07.000000000 +0100
++++ parole-0.2.0.2-ui/src/Makefile.am  2011-03-04 12:33:52.000000000 +0100
+@@ -13,11 +13,12 @@
+       -DPAROLE_PLUGINS_DIR=\"$(libdir)/parole-$(PAROLE_VERSION_API)\"\
+       
-DPAROLE_PLUGINS_DATA_DIR=\"$(datadir)/parole/parole-plugins-$(PAROLE_VERSION_API)\"\
+       -DPAROLE_COMPILATION                    \
++        $(GTK_CFLAGS)                       \
+         $(GTHREAD_CFLAGS)                       \
+       $(GIO_CFLAGS)                           \
+       $(GMODULE_CFLAGS)                       \
+         $(DBUS_GLIB_CFLAGS)                     \
+-        $(LIBXFCE4GUI_CFLAGS)                   \
++        $(LIBXFCE4UI_CFLAGS)                   \
+       $(GST_VIDEO_CFLAGS)                     \
+       $(GST_INTERFACES_CFLAGS)                \
+       $(TAGLIBC_CFLAGS)
+@@ -78,11 +79,12 @@
+       $(top_builddir)/gst/libparolegst.la     \
+       $(top_builddir)/common/libparolecommon.la\
+       $(top_builddir)/common/libparolescreensaver.la\
++        $(GTK_LIBS)                         \
+         $(GTHREAD_LIBS)                         \
+       $(GIO_LIBS)                             \
+       $(GMODULE_LIBS)                         \
+         $(DBUS_GLIB_LIBS)                       \
+-        $(LIBXFCE4GUI_LIBS)                     \
++        $(LIBXFCE4UI_LIBS)                     \
+       $(GST_VIDEO_LIBS)                       \
+       $(GST_INTERFACES_LIBS)                  \
+       $(TAGLIBC_LIBS)
+diff -ur parole-0.2.0.2/src/parole-about.c parole-0.2.0.2-ui/src/parole-about.c
+--- parole-0.2.0.2/src/parole-about.c  2010-01-25 12:22:07.000000000 +0100
++++ parole-0.2.0.2-ui/src/parole-about.c       2011-03-04 14:00:50.000000000 
+0100
+@@ -27,73 +27,56 @@
+ #include <string.h>
+ 
+ #include <libxfce4util/libxfce4util.h>
+-#include <libxfcegui4/libxfcegui4.h>
++#include <libxfce4ui/libxfce4ui.h>
+ 
+ #include "parole-about.h"
+ #include "parole-utils.h"
+ 
+ void  parole_about (void)
+ {
+-    XfceAboutInfo *info;
+-    GtkWidget *dialog;
+     gint x, y;
+     GdkPixbuf *icon;
+-    guint n;
+ 
+-    static const struct
+-    {
+-      gchar *name, *email, *language;
+-    }         
+-    translators[] = 
+-    {
+-      {"astur", "[email protected]", "ast",},
+-      {"Carles Muñoz Gorriz", "[email protected]", "ca.po",},
+-      {"Per Kongstad", "[email protected]", "da.po",},
+-      {"Christoph Wickert", "[email protected]", "de.po",},
+-      {"elega", "[email protected]","es",},
+-      {"Piarres Beobide", "[email protected]", "eu",},
+-      {"Douart Patrick", "[email protected]", "fr",},
+-      {"Leandro Regueiro", "[email protected]", "gl",},
+-      {"Andhika Padmawan", "[email protected]", "id",},
+-      {"Masato Hashimoto", "[email protected]", "ja",},
+-      {"Rihards Prieditis", "[email protected]", "lv",},
+-      {"Mario Blättermann", "[email protected]", "nl",},
+-      {"Sérgio Marques", "[email protected]", "pt",},
+-      {"Vlad Vasilev", "[email protected]", "ru",},
+-      {"Robert Hartl", "[email protected]", "sk",},
+-      {"Samed Beyribey", "[email protected]", "tr",},
+-      {"Motsyo Gennadi", "[email protected]", "uk",},
+-      {"Hunt Xu", "[email protected]", "zh_CN",},
+-      
+-    };
+-
+-    info = xfce_about_info_new ("Parole", VERSION, _("Parole Media Player"),
+-                                XFCE_COPYRIGHT_TEXT ("2009", "Ali Abdallah"), 
+-                              XFCE_LICENSE_GPL);
+-
+-    xfce_about_info_set_homepage (info, 
"http://goodies.xfce.org/projects/applications/parole";);
+-    xfce_about_info_add_credit (info, "Ali Abdallah", "[email protected]", 
_("Author/Maintainer"));
+-  
+-
+-    for (n = 0; n < G_N_ELEMENTS (translators); ++n) 
+-    {
+-      gchar *s;
+-      s = g_strdup_printf (_("Translator (%s)"), translators[n].language);
+-      xfce_about_info_add_credit (info, translators[n].name, 
translators[n].email, s);
+-      g_free (s);
+-    }
++    static gchar *translators = 
++      "astur <[email protected]> ast\n"
++      "Carles Muñoz Gorriz <[email protected]> ca.po\n"
++      "Per Kongstad <[email protected]> da.po\n"
++      "Christoph Wickert <[email protected]> de.po\n"
++      "elega <[email protected]> es\n"
++      "Piarres Beobide <[email protected]> eu\n"
++      "Douart Patrick <[email protected]> fr\n"
++      "Leandro Regueiro <[email protected]> gl\n"
++      "Andhika Padmawan <[email protected]> id\n"
++      "Masato Hashimoto <[email protected]> ja\n"
++      "Rihards Prieditis <[email protected]> lv\n"
++      "Mario Blättermann <[email protected]> nl\n"
++      "Sérgio Marques <[email protected]> pt\n"
++      "Vlad Vasilev <[email protected]> ru\n"
++      "Robert Hartl <[email protected]> sk\n"
++      "Samed Beyribey <[email protected]> tr\n"
++      "Motsyo Gennadi <[email protected]> uk\n"
++      "Hunt Xu <[email protected]> zh_CN\n";
++
++    const gchar *auth[] = { "Ali Abdallah <[email protected]> 
Author/Maintainer", NULL };
+ 
+     gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &x, &y);
+     icon = parole_icon_load ("parole", x);
+-    
+-    dialog = xfce_about_dialog_new_with_values (NULL, info, icon);
+-    
+-      
+-    gtk_dialog_run (GTK_DIALOG (dialog));
+-    gtk_widget_destroy (dialog);
+ 
+-    xfce_about_info_free (info);
+-    
++#if !GTK_CHECK_VERSION (2, 18, 0)
++    gtk_about_dialog_set_email_hook (exo_gtk_url_about_dialog_hook, NULL, 
NULL);
++    gtk_about_dialog_set_url_hook (exo_gtk_url_about_dialog_hook, NULL, NULL);
++#endif
++    gtk_show_about_dialog(NULL,
++       "logo", icon,
++       "program-name", "Parole",
++       "license", xfce_get_license_text (XFCE_LICENSE_TEXT_GPL),
++       "version", VERSION,
++       "comments", _("Parole Media Player"),
++       "website", "http://goodies.xfce.org/projects/applications/parole";,
++       "copyright", _("Copyright (c) 2009 Ali Abdallah\n"),
++       "authors", auth,
++       "translator-credits", translators, NULL);
++
+     if (icon)
+       g_object_unref (G_OBJECT (icon));
+ }
+diff -ur parole-0.2.0.2/src/parole-mediachooser.c 
parole-0.2.0.2-ui/src/parole-mediachooser.c
+--- parole-0.2.0.2/src/parole-mediachooser.c   2010-01-25 12:22:07.000000000 
+0100
++++ parole-0.2.0.2-ui/src/parole-mediachooser.c        2011-03-04 
12:37:35.000000000 +0100
+@@ -30,7 +30,7 @@
+ #include <glib.h>
+ 
+ #include <libxfce4util/libxfce4util.h>
+-#include <libxfcegui4/libxfcegui4.h>
++#include <libxfce4ui/libxfce4ui.h>
+ 
+ #include <parole/parole-file.h>
+ 
+diff -ur parole-0.2.0.2/src/parole-medialist.c 
parole-0.2.0.2-ui/src/parole-medialist.c
+--- parole-0.2.0.2/src/parole-medialist.c      2010-01-25 12:22:07.000000000 
+0100
++++ parole-0.2.0.2-ui/src/parole-medialist.c   2011-03-04 13:27:13.000000000 
+0100
+@@ -33,7 +33,7 @@
+ #include <gio/gio.h>
+ 
+ #include <libxfce4util/libxfce4util.h>
+-#include <libxfcegui4/libxfcegui4.h>
++#include <libxfce4ui/libxfce4ui.h>
+ 
+ #include <parole/parole-file.h>
+ 
+@@ -434,7 +434,7 @@
+     
+     if ( g_access (dirname, W_OK) == -1 )
+     {
+-      xfce_err ("%s %s %s", _("Error saving playlist file"), dirname, 
_("Permission denied"));
++      xfce_dialog_show_error (NULL, NULL, "%s %s %s", _("Error saving 
playlist file"), dirname, _("Permission denied"));
+       goto out;
+     }
+     
+@@ -443,7 +443,7 @@
+       format = parole_pl_parser_guess_format_from_extension (filename);
+       if ( format == PAROLE_PL_FORMAT_UNKNOWN )
+       {
+-          xfce_info ("%s", _("Unknown playlist format, Please select a 
support playlist format"));
++          xfce_dialog_show_info(NULL, NULL, "%s", _("Unknown playlist format, 
Please select a support playlist format"));
+           goto out;
+       }
+     }
+diff -ur parole-0.2.0.2/src/parole-player.c 
parole-0.2.0.2-ui/src/parole-player.c
+--- parole-0.2.0.2/src/parole-player.c 2010-01-25 12:22:07.000000000 +0100
++++ parole-0.2.0.2-ui/src/parole-player.c      2011-03-04 13:52:31.000000000 
+0100
+@@ -29,13 +29,14 @@
+ #ifdef HAVE_XF86_KEYSYM
+ #include <X11/XF86keysym.h>
+ #endif
++#include <X11/Xatom.h>
+ 
+ #include <gdk/gdkx.h>
+ #include <gdk/gdkkeysyms.h>
+ #include <gtk/gtk.h>
+ 
+ #include <libxfce4util/libxfce4util.h>
+-#include <libxfcegui4/libxfcegui4.h>
++#include <libxfce4ui/libxfce4ui.h>
+ 
+ #include <dbus/dbus-glib.h>
+ 
+@@ -963,7 +964,7 @@
+ static void
+ parole_player_error_cb (ParoleGst *gst, const gchar *error, ParolePlayer 
*player)
+ {
+-    xfce_err ("%s", error);
++    xfce_dialog_show_error (NULL, NULL, "%s", error);
+     parole_screen_saver_uninhibit (player->priv->screen_saver);
+     parole_player_stopped (player);
+ }
+@@ -1874,7 +1875,7 @@
+     g_signal_connect_swapped (player->priv->conf, "notify::reset-saver",
+                             G_CALLBACK 
(parole_player_reset_saver_changed_cb), player);
+     
+-    player->priv->session = parole_session_get ();
++    player->priv->session = parole_session_get (NULL);
+     
+     g_signal_connect_swapped (player->priv->session, "die",
+                             G_CALLBACK (parole_player_session_die_cb), 
player);
+diff -ur parole-0.2.0.2/src/parole-plugins-manager.c 
parole-0.2.0.2-ui/src/parole-plugins-manager.c
+--- parole-0.2.0.2/src/parole-plugins-manager.c        2010-01-25 
12:22:07.000000000 +0100
++++ parole-0.2.0.2-ui/src/parole-plugins-manager.c     2011-03-04 
13:27:20.000000000 +0100
+@@ -29,7 +29,7 @@
+ #include <glib.h>
+ 
+ #include <libxfce4util/libxfce4util.h>
+-#include <libxfcegui4/libxfcegui4.h>
++#include <libxfce4ui/libxfce4ui.h>
+ 
+ #include <parole/parole-provider-plugin.h>
+ 
+@@ -409,7 +409,7 @@
+     /*No plugins found*/
+     if ( manager->priv->array->len == 0 )
+     {
+-      xfce_info ("%s", _("No installed plugins found on this system")); 
++      xfce_dialog_show_info(NULL, NULL, "%s", _("No installed plugins found 
on this system")); 
+       return;
+     }
+     
+diff -ur parole-0.2.0.2/src/parole-session.c 
parole-0.2.0.2-ui/src/parole-session.c
+--- parole-0.2.0.2/src/parole-session.c        2010-01-25 12:22:07.000000000 
+0100
++++ parole-0.2.0.2-ui/src/parole-session.c     2011-03-04 13:54:39.000000000 
+0100
+@@ -27,7 +27,7 @@
+ #include <string.h>
+ 
+ #include <libxfce4util/libxfce4util.h>
+-#include <libxfcegui4/libxfcegui4.h>
++#include <libxfce4ui/libxfce4ui.h>
+ 
+ #include "parole-session.h"
+ 
+@@ -38,13 +38,12 @@
+ 
+ struct ParoleSessionPrivate
+ {
+-    SessionClient *client;
+-    gboolean     managed;
++    XfceSMClient  *client;
++    gboolean       managed;
+ };
+ 
+ enum
+ {
+-    DIE,
+     SAVE_STATE,
+     LAST_SIGNAL
+ };
+@@ -54,31 +53,10 @@
+ G_DEFINE_TYPE (ParoleSession, parole_session, G_TYPE_OBJECT)
+ 
+ static void
+-parole_session_die (gpointer client_data)
+-{
+-    ParoleSession *session;
+-    
+-    session = parole_session_get ();
+-    
+-    if ( session->priv->managed )
+-      g_signal_emit (G_OBJECT (session), signals [DIE], 0);
+-}
+-
+-static void
+ parole_session_class_init (ParoleSessionClass *klass)
+ {
+     GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ 
+-    signals [DIE] = 
+-        g_signal_new ("die",
+-                      PAROLE_TYPE_SESSION,
+-                      G_SIGNAL_RUN_LAST,
+-                      G_STRUCT_OFFSET(ParoleSessionClass, die),
+-                      NULL, NULL,
+-                      g_cclosure_marshal_VOID__VOID,
+-                      G_TYPE_NONE, 0, G_TYPE_NONE);
+-                    
+-
+     signals [SAVE_STATE] = 
+         g_signal_new ("save-state",
+                       PAROLE_TYPE_SESSION,
+@@ -99,26 +77,6 @@
+     session->priv = PAROLE_SESSION_GET_PRIVATE (session);
+     
+     session->priv->client = NULL;
+-    
+-    session->priv->client = client_session_new_full (NULL,
+-                                                   SESSION_RESTART_NEVER,
+-                                                   40,
+-                                                   NULL,
+-                                                   (gchar *) PACKAGE_NAME,
+-                                                   NULL,
+-                                                   NULL,
+-                                                   NULL,
+-                                                   NULL,
+-                                                   NULL,
+-                                                   NULL);
+-                                                   
+-    if ( G_UNLIKELY (session->priv->client == NULL ) )
+-    {
+-      g_warning ("Failed to connect to session manager");
+-      return;
+-    }
+-    
+-    session->priv->client->die     = parole_session_die;
+ }
+ 
+ static void
+@@ -130,45 +88,53 @@
+     
+     if ( session->priv->client != NULL )
+     {
+-      client_session_free (session->priv->client);
++      g_object_unref (session->priv->client);
+     }
+ 
+     G_OBJECT_CLASS (parole_session_parent_class)->finalize (object);
+ }
+ 
+ ParoleSession *
+-parole_session_get (void)
++parole_session_get (const gchar *client_id)
+ {
+     static gpointer parole_session_obj = NULL;
+-    
++    ParoleSession *session = NULL;
++    GError *error = NULL;
++    gchar *current_dir;
++
++    const gchar *restart_command[] =
++    {
++        "parole",
++      "--restart",
++      NULL
++    };
++
+     if ( G_LIKELY (parole_session_obj != NULL ) )
+     {
+       g_object_ref (parole_session_obj);
+     }
+     else
+     {
+-      parole_session_obj = g_object_new (PAROLE_TYPE_SESSION, NULL);
++        session = g_object_new (PAROLE_TYPE_SESSION, NULL);
++        current_dir = g_get_current_dir ();
++        session->priv->client = xfce_sm_client_get_full 
(XFCE_SM_CLIENT_RESTART_NORMAL,
++                                                         
XFCE_SM_CLIENT_PRIORITY_DEFAULT,
++                                                       client_id,
++                                                         current_dir,
++                                                         restart_command,
++                                                         
"/etc/xdg/autostart/" PACKAGE_NAME ".desktop");
++//                                                         SYSCONFDIR 
"/xdg/autostart/" PACKAGE_NAME ".desktop");
++        g_free (current_dir);
++        session->priv->managed = xfce_sm_client_connect 
(session->priv->client, &error);
++
++        if ( G_UNLIKELY (error) )
++        {
++            g_warning ("Failed to connect to session manager : %s", 
error->message);
++            g_error_free (error);
++        }
++      parole_session_obj = session;
+       g_object_add_weak_pointer (parole_session_obj, &parole_session_obj);
+     }
+     
+     return PAROLE_SESSION (parole_session_obj);
+ }
+-
+-void parole_session_real_init       (ParoleSession *session)
+-{
+-    g_return_if_fail (PAROLE_IS_SESSION (session));
+-    g_return_if_fail (session->priv->managed == FALSE);
+-    
+-    session->priv->managed = session_init (session->priv->client);
+-}
+-
+-void parole_session_set_client_id (ParoleSession *session, const gchar 
*client_id)
+-{
+-    g_return_if_fail (PAROLE_IS_SESSION (session));
+-    g_return_if_fail (session->priv->managed == FALSE);
+-    
+-    if ( G_UNLIKELY (session->priv->client == NULL) )
+-      return;
+-    
+-    client_session_set_client_id (session->priv->client, client_id);
+-}
+diff -ur parole-0.2.0.2/src/parole-session.h 
parole-0.2.0.2-ui/src/parole-session.h
+--- parole-0.2.0.2/src/parole-session.h        2010-01-25 12:22:07.000000000 
+0100
++++ parole-0.2.0.2-ui/src/parole-session.h     2011-03-04 13:51:49.000000000 
+0100
+@@ -50,12 +50,8 @@
+ 
+ GType                         parole_session_get_type        (void) 
G_GNUC_CONST;
<<Diff was trimmed, longer than 597 lines>>
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to