Author: kelnos
Date: 2008-10-18 12:40:12 +0000 (Sat, 18 Oct 2008)
New Revision: 28292

Modified:
   xfce4-session/trunk/ChangeLog
   xfce4-session/trunk/NEWS
   xfce4-session/trunk/configure.in.in
   xfce4-session/trunk/engines/balou/Makefile.am
   xfce4-session/trunk/engines/balou/config.c
   xfce4-session/trunk/engines/balou/engine.c
   xfce4-session/trunk/engines/mice/Makefile.am
   xfce4-session/trunk/engines/simple/Makefile.am
   xfce4-session/trunk/engines/simple/simple.c
   xfce4-session/trunk/libxfsm/xfce4-session-2.0.pc.in
   xfce4-session/trunk/libxfsm/xfsm-splash-rc.c
   xfce4-session/trunk/libxfsm/xfsm-splash-rc.h
   xfce4-session/trunk/settings/module.c
   xfce4-session/trunk/settings/module.h
   xfce4-session/trunk/settings/splash-settings.c
   xfce4-session/trunk/xfce4-session/xfsm-splash-screen.c
Log:
        * configure.in.in: Depend on newer version of libxfconf.
        * engines/*/Makefile.am: Link with libxfconf.
        * libxfsm/xfsm-splash-rc.*: Replace XfceRc usage with
          XfconfChannel.
        * libxfsm/xfce4-session-2.0.pc.in: Add libxfconf-0 to required
          packages list.
        * settings/{module.*,splash-settings.c]: Load XfconfChannel
          with a property base instead of the old XfceRc file.
        * xfce4-session/xfsm-splash-screen.c: Fetch settings from
          xfconf instead of rc file.

Modified: xfce4-session/trunk/ChangeLog
===================================================================
--- xfce4-session/trunk/ChangeLog       2008-10-18 12:00:26 UTC (rev 28291)
+++ xfce4-session/trunk/ChangeLog       2008-10-18 12:40:12 UTC (rev 28292)
@@ -1,3 +1,16 @@
+2008-10-18     Brian Tarricone <[EMAIL PROTECTED]>
+
+       * configure.in.in: Depend on newer version of libxfconf.
+       * engines/*/Makefile.am: Link with libxfconf.
+       * libxfsm/xfsm-splash-rc.*: Replace XfceRc usage with
+         XfconfChannel.
+       * libxfsm/xfce4-session-2.0.pc.in: Add libxfconf-0 to required
+         packages list.
+       * settings/{module.*,splash-settings.c]: Load XfconfChannel
+         with a property base instead of the old XfceRc file.
+       * xfce4-session/xfsm-splash-screen.c: Fetch settings from
+         xfconf instead of rc file.
+
 2008-10-17     Brian Tarricone <[EMAIL PROTECTED]>
 
        * xfce4-session/xfsm-chooser.c: Use xfce_create_mixed_button()

Modified: xfce4-session/trunk/NEWS
===================================================================
--- xfce4-session/trunk/NEWS    2008-10-18 12:00:26 UTC (rev 28291)
+++ xfce4-session/trunk/NEWS    2008-10-18 12:40:12 UTC (rev 28292)
@@ -4,6 +4,7 @@
 - Fix possible crash with uninitialised GError (bug 4202).
 - Link libxfsm against all required libs to avoid link-time errors
   (bug 4429).
+- Make splash engines store their settings in Xfconf.
 
 
 4.5.91

Modified: xfce4-session/trunk/configure.in.in
===================================================================
--- xfce4-session/trunk/configure.in.in 2008-10-18 12:00:26 UTC (rev 28291)
+++ xfce4-session/trunk/configure.in.in 2008-10-18 12:40:12 UTC (rev 28292)
@@ -76,7 +76,7 @@
 XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12])
 XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.0.0])
 XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.73])
-XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.5.91])
+XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.5.91svn-r28290])
 XDT_CHECK_PACKAGE([LIBGLADE], [libglade-2.0], [2.0.0])
 
 dnl Check for gnome support

Modified: xfce4-session/trunk/engines/balou/Makefile.am
===================================================================
--- xfce4-session/trunk/engines/balou/Makefile.am       2008-10-18 12:00:26 UTC 
(rev 28291)
+++ xfce4-session/trunk/engines/balou/Makefile.am       2008-10-18 12:40:12 UTC 
(rev 28292)
@@ -18,7 +18,8 @@
 
 libbalou_la_CFLAGS =                                                   \
        -I$(top_srcdir)                                                 \
-       @LIBXFCEGUI4_CFLAGS@                                            \
+       $(LIBXFCEGUI4_CFLAGS)                                           \
+       $(XFCONF_CFLAGS)                                                \
        -DBALOU_EXPORT_THEME=\"$(libexecdir)/balou-export-theme\"       \
        -DBALOU_INSTALL_THEME=\"$(libexecdir)/balou-install-theme\"
 
@@ -28,12 +29,10 @@
        -module
 
 libbalou_la_LIBADD =                                                   \
-       $(top_builddir)/libxfsm/libxfsm-4.6.la
+       $(top_builddir)/libxfsm/libxfsm-4.6.la                          \
+       $(LIBXFCEGUI4_LIBS)                                             \
+       $(XFCONF_LIBS)
 
-if HAVE_OS_CYGWIN
-libbalou_la_LIBADD +=                                                  \
-       @XFCE_MCS_MANAGER_LIBS@
-endif
 
 libbalou_la_DEPENDENCIES =                                             \
        $(top_builddir)/libxfsm/libxfsm-4.6.la

Modified: xfce4-session/trunk/engines/balou/config.c
===================================================================
--- xfce4-session/trunk/engines/balou/config.c  2008-10-18 12:00:26 UTC (rev 
28291)
+++ xfce4-session/trunk/engines/balou/config.c  2008-10-18 12:40:12 UTC (rev 
28292)
@@ -835,7 +835,7 @@
   GtkWidget         *page;
   GtkWidget         *swin;
   GtkWidget         *vbox;
-  const gchar       *theme;
+  gchar             *theme;
 
   theme = xfsm_splash_rc_read_entry (rc, "Theme", "Default");
 
@@ -914,6 +914,8 @@
   g_signal_connect (G_OBJECT (treeview), "destroy",
                     G_CALLBACK (config_store), rc);
 
+  g_free (theme);
+
   return page;
 }
 
@@ -947,7 +949,7 @@
 static GdkPixbuf*
 config_preview (XfsmSplashConfig *config)
 {
-  const gchar *name;
+  gchar       *name;
   BalouTheme  *theme;
   GdkPixbuf   *pixbuf = NULL;
 
@@ -959,6 +961,8 @@
   pixbuf = balou_theme_generate_preview (theme, 320, 240);
   balou_theme_destroy (theme);
 
+  g_free (name);
+
   return pixbuf;
 }
 

Modified: xfce4-session/trunk/engines/balou/engine.c
===================================================================
--- xfce4-session/trunk/engines/balou/engine.c  2008-10-18 12:00:26 UTC (rev 
28291)
+++ xfce4-session/trunk/engines/balou/engine.c  2008-10-18 12:40:12 UTC (rev 
28292)
@@ -37,11 +37,12 @@
 engine_setup (XfsmSplashEngine *engine,
               XfsmSplashRc     *rc)
 {
-  const gchar *theme_name;
-  BalouTheme  *theme;
+  gchar      *theme_name;
+  BalouTheme *theme;
 
   theme_name = xfsm_splash_rc_read_entry (rc, "Theme", DEFAULT_THEME);
   theme = balou_theme_load (theme_name);
+  g_free (theme_name);
 
   balou_init (BALOU (engine->user_data),
               engine->display,

Modified: xfce4-session/trunk/engines/mice/Makefile.am
===================================================================
--- xfce4-session/trunk/engines/mice/Makefile.am        2008-10-18 12:00:26 UTC 
(rev 28291)
+++ xfce4-session/trunk/engines/mice/Makefile.am        2008-10-18 12:40:12 UTC 
(rev 28292)
@@ -9,7 +9,8 @@
 
 libmice_la_CFLAGS =                                                    \
        -I$(top_srcdir)                                                 \
-       @LIBXFCEGUI4_CFLAGS@
+       $(LIBXFCEGUI4_CFLAGS)                                           \
+       $(XFCONF_CFLAGS)
 
 libmice_la_LDFLAGS =                                                   \
        -avoid-version                                                  \
@@ -17,13 +18,10 @@
        -module
 
 libmice_la_LIBADD =                                                    \
-       $(top_builddir)/libxfsm/libxfsm-4.6.la
+       $(top_builddir)/libxfsm/libxfsm-4.6.la                          \
+       $(LIBXFCEGUI4_LIBS)                                             \
+       $(XFCONF_LIBS)
 
-if HAVE_OS_CYGWIN
-libmice_la_LIBADD +=                                                   \
-       @XFCE_MCS_MANAGER_LIBS@
-endif
-
 libmice_la_DEPENDENCIES =                                              \
        $(top_builddir)/libxfsm/libxfsm-4.6.la
 
@@ -34,10 +32,10 @@
        generate.c
 
 generate_CFLAGS =                                                      \
-       @LIBXFCEGUI4_CFLAGS@
+       $(LIBXFCEGUI4_CFLAGS)
 
 generate_LDADD =                                                       \
-       @LIBXFCEGUI4_LIBS@
+       $(LIBXFCEGUI4_LIBS)
 
 
 EXTRA_DIST =                                                           \

Modified: xfce4-session/trunk/engines/simple/Makefile.am
===================================================================
--- xfce4-session/trunk/engines/simple/Makefile.am      2008-10-18 12:00:26 UTC 
(rev 28291)
+++ xfce4-session/trunk/engines/simple/Makefile.am      2008-10-18 12:40:12 UTC 
(rev 28292)
@@ -9,22 +9,22 @@
 
 libsimple_la_CFLAGS =                                                  \
        -I$(top_srcdir)                                                 \
-       @LIBX11_CFLAGS@                                                 \
-       @LIBXFCEGUI4_CFLAGS@
+       $(LIBX11_CFLAGS)                                                \
+       $(LIBXFCEGUI4_CFLAGS)                                           \
+       $(XFCONF_CFLAGS)
 
 libsimple_la_LDFLAGS =                                                 \
        -avoid-version                                                  \
        -no-undefined                                                   \
-       -module
+       -module                                                         \
+       $(LIBX11_LDFLAGS)
 
 libsimple_la_LIBADD =                                                  \
-       $(top_builddir)/libxfsm/libxfsm-4.6.la
+       $(top_builddir)/libxfsm/libxfsm-4.6.la                          \
+       $(LIBX11_LIBS)                                                  \
+       $(LIBXFCEGUI4_LIBS)                                             \
+       $(XFCONF_LIBS)
 
-if HAVE_OS_CYGWIN
-libsimple_la_LIBADD +=                                                 \
-       @XFCE_MCS_MANAGER_LIBS@
-endif
-
 libsimple_la_DEPENDENCIES =                                            \
        $(top_builddir)/libxfsm/libxfsm-4.6.la
        

Modified: xfce4-session/trunk/engines/simple/simple.c
===================================================================
--- xfce4-session/trunk/engines/simple/simple.c 2008-10-18 12:00:26 UTC (rev 
28291)
+++ xfce4-session/trunk/engines/simple/simple.c 2008-10-18 12:40:12 UTC (rev 
28292)
@@ -92,8 +92,9 @@
   PangoContext         *context;
   GdkWindowAttr         attr;
   GdkRectangle          geo;
-  const gchar          *font;
-  const gchar          *path;
+  gchar                *color;
+  gchar                *font;
+  gchar                *path;
   GdkWindow            *root;
   GdkPixbuf            *logo = NULL;
   GdkCursor            *cursor;
@@ -105,10 +106,14 @@
   simple = (Simple *) engine->user_data;
 
   /* load settings */
-  gdk_color_parse (xfsm_splash_rc_read_entry (rc, "BgColor", DEFAULT_BGCOLOR),
-                   &simple->bgcolor);
-  gdk_color_parse (xfsm_splash_rc_read_entry (rc, "FgColor", DEFAULT_FGCOLOR),
-                   &simple->fgcolor);
+  color = xfsm_splash_rc_read_entry (rc, "BgColor", DEFAULT_BGCOLOR);
+  gdk_color_parse (color, &simple->bgcolor);
+  g_free (color);
+
+  color = xfsm_splash_rc_read_entry (rc, "FgColor", DEFAULT_FGCOLOR);
+  gdk_color_parse (color, &simple->fgcolor);
+  g_free (color);
+
   font = xfsm_splash_rc_read_entry (rc, "Font", DEFAULT_FONT);
   path = xfsm_splash_rc_read_entry (rc, "Image", NULL);
 
@@ -190,6 +195,8 @@
   gdk_window_show (simple->window);
 
   /* cleanup */
+  g_free (font);
+  g_free (path);
   pango_font_description_free (description);
   pango_font_metrics_unref (metrics);
   gdk_cursor_unref (cursor);
@@ -345,8 +352,9 @@
 config_configure (XfsmSplashConfig *config,
                   GtkWidget        *parent)
 {
-  const gchar *font;
-  const gchar *path;
+  gchar       *font;
+  gchar       *path;
+  gchar       *colorstr;
   GtkWidget   *dialog;
   GtkWidget   *frame;
   GtkWidget   *btn_font;
@@ -379,6 +387,7 @@
 
   font = xfsm_splash_rc_read_entry (config->rc, "Font", DEFAULT_FONT);
   btn_font = gtk_font_button_new_with_font (font);
+  g_free (font);
   xfce_framebox_add (XFCE_FRAMEBOX (frame), btn_font);
   gtk_widget_show (btn_font);
 
@@ -395,8 +404,9 @@
                     GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
-  gdk_color_parse (xfsm_splash_rc_read_entry (config->rc, "BgColor",
-                                              DEFAULT_BGCOLOR), &color);
+  colorstr = xfsm_splash_rc_read_entry (config->rc, "BgColor", 
DEFAULT_BGCOLOR);
+  gdk_color_parse (colorstr, &color);
+  g_free (colorstr);
   sel_bg = xfce_color_button_new_with_color (&color);
   gtk_table_attach (GTK_TABLE (table), sel_bg, 1, 2, 0, 1,
                     GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
@@ -407,8 +417,9 @@
                     GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
-  gdk_color_parse (xfsm_splash_rc_read_entry (config->rc, "FgColor",
-                                              DEFAULT_FGCOLOR), &color);
+  colorstr = xfsm_splash_rc_read_entry (config->rc, "FgColor", 
DEFAULT_FGCOLOR);
+  gdk_color_parse (colorstr, &color);
+  g_free (colorstr);
   sel_fg = xfce_color_button_new_with_color (&color);
   gtk_table_attach (GTK_TABLE (table), sel_fg, 1, 2, 1, 2,
                     GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
@@ -454,6 +465,7 @@
       gtk_widget_set_sensitive (button, TRUE);
       gtk_entry_set_text (GTK_ENTRY (entry), path);
     }
+  g_free (path);
   g_signal_connect (G_OBJECT (checkbox), "toggled",
                     G_CALLBACK (config_toggled), entry);
   g_signal_connect (G_OBJECT (checkbox), "toggled",
@@ -465,8 +477,8 @@
   gtk_dialog_run (GTK_DIALOG (dialog));
 
   /* store settings */
-  font = gtk_font_button_get_font_name (GTK_FONT_BUTTON (btn_font));
-  xfsm_splash_rc_write_entry (config->rc, "Font", font);
+  xfsm_splash_rc_write_entry (config->rc, "Font",
+                              gtk_font_button_get_font_name (GTK_FONT_BUTTON 
(btn_font)));
 
   xfce_color_button_get_color (XFCE_COLOR_BUTTON (sel_bg), &color);
   g_snprintf (buffer, 32, "#%02x%02x%02x",
@@ -482,7 +494,7 @@
               (unsigned) color.blue >> 8);
   xfsm_splash_rc_write_entry (config->rc, "FgColor", buffer);
 
-  path = gtk_entry_get_text (GTK_ENTRY (entry));
+  path = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
   if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox))
       && path != NULL && g_file_test (path, G_FILE_TEST_IS_REGULAR))
     {
@@ -492,6 +504,7 @@
     {
       xfsm_splash_rc_write_entry (config->rc, "Image", "");
     }
+  g_free (path);
   
   gtk_widget_destroy (dialog);
 }

Modified: xfce4-session/trunk/libxfsm/xfce4-session-2.0.pc.in
===================================================================
--- xfce4-session/trunk/libxfsm/xfce4-session-2.0.pc.in 2008-10-18 12:00:26 UTC 
(rev 28291)
+++ xfce4-session/trunk/libxfsm/xfce4-session-2.0.pc.in 2008-10-18 12:40:12 UTC 
(rev 28292)
@@ -5,7 +5,7 @@
 
 Name: xfce4-session
 Description: Xfce 4 session manager
-Requires: libxfcegui4-1.0
+Requires: libxfcegui4-1.0 libxfconf-0
 Version: @VERSION@
 Libs: -L${libdir} -lxfsm-4.6
 Cflags: -I${includedir}/xfce4/xfce4-session-4.6

Modified: xfce4-session/trunk/libxfsm/xfsm-splash-rc.c
===================================================================
--- xfce4-session/trunk/libxfsm/xfsm-splash-rc.c        2008-10-18 12:00:26 UTC 
(rev 28291)
+++ xfce4-session/trunk/libxfsm/xfsm-splash-rc.c        2008-10-18 12:40:12 UTC 
(rev 28292)
@@ -25,35 +25,37 @@
 
 #include <libxfsm/xfsm-splash-rc.h>
 
+#define PROP_FROM_KEY(varname, key) \
+  gchar varname[4096]; \
+  g_strlcpy(varname, "/", sizeof(varname)); \
+  g_strlcat(varname, key, sizeof(varname))
 
+
 struct _XfsmSplashRc
 {
-  gchar  *group;
-  XfceRc *rc;
+  XfconfChannel *channel;
 };
 
 
 XfsmSplashRc*
-xfsm_splash_rc_new (XfceRc      *rc,
-                    const gchar *group)
+xfsm_splash_rc_new (XfconfChannel *channel)
 {
   XfsmSplashRc *splash_rc;
 
-  splash_rc         = g_new (XfsmSplashRc, 1);
-  splash_rc->group  = g_strdup (group);
-  splash_rc->rc     = rc;
+  splash_rc          = g_new (XfsmSplashRc, 1);
+  splash_rc->channel = g_object_ref (channel);
 
   return splash_rc;
 }
 
 
-const gchar*
+gchar*
 xfsm_splash_rc_read_entry (XfsmSplashRc *splash_rc,
                            const gchar  *key,
                            const gchar  *fallback)
 {
-  xfce_rc_set_group (splash_rc->rc, splash_rc->group);
-  return xfce_rc_read_entry (splash_rc->rc, key, fallback);
+  PROP_FROM_KEY(prop, key);
+  return xfconf_channel_get_string (splash_rc->channel, prop, fallback);
 }
 
 
@@ -62,8 +64,8 @@
                                const gchar  *key,
                                gint          fallback)
 {
-  xfce_rc_set_group (splash_rc->rc, splash_rc->group);
-  return xfce_rc_read_int_entry (splash_rc->rc, key, fallback);
+  PROP_FROM_KEY(prop, key);
+  return xfconf_channel_get_int (splash_rc->channel, prop, fallback);
 }
 
 
@@ -72,8 +74,8 @@
                                 const gchar  *key,
                                 gboolean      fallback)
 {
-  xfce_rc_set_group (splash_rc->rc, splash_rc->group);
-  return xfce_rc_read_bool_entry (splash_rc->rc, key, fallback);
+  PROP_FROM_KEY(prop, key);
+  return xfconf_channel_get_bool (splash_rc->channel, prop, fallback);
 }
 
 
@@ -82,8 +84,8 @@
                                 const gchar  *key,
                                 const gchar  *delimiter)
 {
-  xfce_rc_set_group (splash_rc->rc, splash_rc->group);
-  return xfce_rc_read_list_entry (splash_rc->rc, key, delimiter);
+  PROP_FROM_KEY(prop, key);
+  return xfconf_channel_get_string_list (splash_rc->channel, prop);
 }
 
 
@@ -92,8 +94,8 @@
                             const gchar  *key,
                             const gchar  *value)
 {
-  xfce_rc_set_group (splash_rc->rc, splash_rc->group);
-  xfce_rc_write_entry (splash_rc->rc, key, value);
+  PROP_FROM_KEY(prop, key);
+  xfconf_channel_set_string (splash_rc->channel, prop, value);
 }
 
 
@@ -102,8 +104,8 @@
                                 const gchar  *key,
                                 gint          value)
 {
-  xfce_rc_set_group (splash_rc->rc, splash_rc->group);
-  xfce_rc_write_int_entry (splash_rc->rc, key, value);
+  PROP_FROM_KEY(prop, key);
+  xfconf_channel_set_int (splash_rc->channel, prop, value);
 }
 
 
@@ -112,8 +114,8 @@
                                  const gchar  *key,
                                  gboolean      value)
 {
-  xfce_rc_set_group (splash_rc->rc, splash_rc->group);
-  xfce_rc_write_bool_entry (splash_rc->rc, key, value);
+  PROP_FROM_KEY(prop, key);
+  xfconf_channel_set_bool (splash_rc->channel, prop, value);
 }
 
 
@@ -123,15 +125,15 @@
                                  gchar       **value,
                                  const gchar  *delimiter)
 {
-  xfce_rc_set_group (splash_rc->rc, splash_rc->group);
-  xfce_rc_write_list_entry (splash_rc->rc, key, value, delimiter);
+  PROP_FROM_KEY(prop, key);
+  xfconf_channel_set_string_list (splash_rc->channel, prop, (gchar const 
**)value);
 }
 
 
 void
 xfsm_splash_rc_free (XfsmSplashRc *splash_rc)
 {
-  g_free (splash_rc->group);
+  g_object_unref (splash_rc->channel);
   g_free (splash_rc);
 }
 

Modified: xfce4-session/trunk/libxfsm/xfsm-splash-rc.h
===================================================================
--- xfce4-session/trunk/libxfsm/xfsm-splash-rc.h        2008-10-18 12:00:26 UTC 
(rev 28291)
+++ xfce4-session/trunk/libxfsm/xfsm-splash-rc.h        2008-10-18 12:40:12 UTC 
(rev 28292)
@@ -23,6 +23,7 @@
 #define __XFSM_SPLASH_RC_H__
 
 #include <gmodule.h>
+#include <xfconf/xfconf.h>
 #include <libxfce4util/libxfce4util.h>
 
 
@@ -32,10 +33,10 @@
 
 
 G_MODULE_IMPORT
-XfsmSplashRc *xfsm_splash_rc_new              (XfceRc       *rc,
-                                               const gchar  *group);
+XfsmSplashRc *xfsm_splash_rc_new              (XfconfChannel*channel);
+
 G_MODULE_IMPORT
-const gchar  *xfsm_splash_rc_read_entry       (XfsmSplashRc *splash_rc,
+gchar        *xfsm_splash_rc_read_entry       (XfsmSplashRc *splash_rc,
                                                const gchar  *key,
                                                const gchar  *fallback);
 G_MODULE_IMPORT

Modified: xfce4-session/trunk/settings/module.c
===================================================================
--- xfce4-session/trunk/settings/module.c       2008-10-18 12:00:26 UTC (rev 
28291)
+++ xfce4-session/trunk/settings/module.c       2008-10-18 12:40:12 UTC (rev 
28292)
@@ -51,13 +51,14 @@
 
 Module*
 module_load (const gchar *path,
-             XfceRc      *rc)
+             const gchar *channel_name)
 {
   void (*init) (XfsmSplashConfig *config);
   Module *module;
-  gchar   group[128];
-  gchar  *dp;
-  gchar  *sp;
+  gchar          property_base[512];
+  XfconfChannel *channel;
+  gchar         *dp;
+  gchar         *sp;
 
   /* load module */
   module = g_new0 (Module, 1);
@@ -83,10 +84,15 @@
         *dp = *sp;
     }
   *dp = '\0';
-  g_snprintf (group, 128, "Engine: %s", module->engine);
 
+  g_snprintf (property_base, sizeof (property_base),
+              "/splash/engines/%s", module->engine);
+  channel = xfconf_channel_new_with_property_base (channel_name,
+                                                   property_base);
+
   /* initialize module */
-  module->config.rc = xfsm_splash_rc_new (rc, group);
+  module->config.rc = xfsm_splash_rc_new (channel);
+  g_object_unref (channel);
   init (&module->config);
   if (G_UNLIKELY (module->config.name == NULL))
     {

Modified: xfce4-session/trunk/settings/module.h
===================================================================
--- xfce4-session/trunk/settings/module.h       2008-10-18 12:00:26 UTC (rev 
28291)
+++ xfce4-session/trunk/settings/module.h       2008-10-18 12:40:12 UTC (rev 
28292)
@@ -34,8 +34,8 @@
 typedef struct _Module Module;
 
 
-Module      *module_load          (const gchar  *path,
-                                   XfceRc       *rc);
+Module      *module_load          (const gchar *path,
+                                   const gchar *channel_name);
 
 const gchar *module_engine        (const Module *module);
 

Modified: xfce4-session/trunk/settings/splash-settings.c
===================================================================
--- xfce4-session/trunk/settings/splash-settings.c      2008-10-18 12:00:26 UTC 
(rev 28291)
+++ xfce4-session/trunk/settings/splash-settings.c      2008-10-18 12:40:12 UTC 
(rev 28292)
@@ -123,7 +123,7 @@
             continue;
 
           file = g_strconcat (MODULESDIR, G_DIR_SEPARATOR_S, entry, NULL);
-          module = module_load (file, modules_rc);
+          module = module_load (file, SETTINGS_CHANNEL);
           if (G_LIKELY (module != NULL))
             modules = g_list_append (modules, module);
           g_free (file);

Modified: xfce4-session/trunk/xfce4-session/xfsm-splash-screen.c
===================================================================
--- xfce4-session/trunk/xfce4-session/xfsm-splash-screen.c      2008-10-18 
12:00:26 UTC (rev 28291)
+++ xfce4-session/trunk/xfce4-session/xfsm-splash-screen.c      2008-10-18 
12:40:12 UTC (rev 28292)
@@ -32,6 +32,7 @@
 
 #include <gmodule.h>
 
+#include <xfconf/xfconf.h>
 #include <libxfce4util/libxfce4util.h>
 #include <libxfcegui4/libxfcegui4.h>
 
@@ -62,7 +63,7 @@
   GdkScreen        *screen;
   gchar             name[128];
   int               monitor;
-  XfceRc           *rc;
+  XfconfChannel    *channel;
 
   /* locate monitor with pointer */
   screen = xfce_gdk_display_locate_monitor_with_pointer (display, &monitor);
@@ -84,14 +85,13 @@
       xfsm_splash_screen_load (splash, engine);
       if (G_LIKELY (splash->engine.setup != NULL))
         {
-          rc = xfce_rc_config_open (XFCE_RESOURCE_CONFIG,
-                                    "xfce4-session/xfce4-splash.rc",
-                                    TRUE);
-          g_snprintf (name, 128, "Engine: %s", engine);
-          splash_rc = xfsm_splash_rc_new (rc, name);
+          g_snprintf (name, sizeof(name), "/splash/engines/%s", engine);
+          channel = xfconf_channel_new_with_property_base ("xfce4-session",
+                                                           name);
+          splash_rc = xfsm_splash_rc_new (channel);
+          g_object_unref (channel);
           splash->engine.setup (&splash->engine, splash_rc);
           xfsm_splash_rc_free (splash_rc);
-          xfce_rc_close (rc);
 
           gdk_flush ();
         }

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to