config daemon/library for 4.6

Nick Schermer nickschermer at
Wed Sep 5 12:56:20 CEST 2007

2007/9/5, Brian J. Tarricone <bjt23 at>:
> On Tue, 4 Sep 2007 13:26:22 -0400 Erik Harrison wrote:
> > On 9/4/07, Brian J. Tarricone <bjt23 at> wrote:
> >
> > > 7.  I plan on adding a simple client-side transaction type thing
> [...]
> >
> > In previous discussions, no one has actually come up with a use for
> > transactions, just that they can imagine wanting them for
> > completeness, or in some vague future. If no one needs it why
> > implement a finicky half solution?
> Yeah, good call.  If there's a need for it, it can be implemented
> properly later.
> I just added a GetAll() method to get all properties in a given channel
> (the idea being an app will grab all settings it cares about in one go
> on startup to avoid a bunch of round-trips).  A SetMultiple() method
> might make some sense; client-side transactions could be implemented
> using it, and, assuming the config store backend is implemented
> properly, even the daemon crashing would ensure either all or none of
> the changes in the transaction get committed.  But I'll leave that till
> later if there's an actual need.

Maybe the xfconf_channel set functions can be written as va_lists. So
you can write multiple settings (in 1 transaction) using

gboolean xfconf_channel_set_string(XfconfChannel *channel,
                                   const gchar *property1,
                                   const gchar *value1,
                                   const gchar *property2,
                                   const gchar *value2,

For that reason I also prefer the fist way you retreived the variables
(in combination with va_lists):

gboolean xfconf_channel_get_string (XfconfChannel *channel,
                                   const gchar *property1,
                                   char **value1,
                                   const gchar *default1,
                                   const gchar *property2,
                                   char **value2,
                                   const gchar *default2,

Maybe it's also useful to have a function to remove a channel and all
the properties inside (for example when a plugin is removed from the
panel, the panel can ask to remove all the plugin settings).

gboolean xfconf_channel_remove (const gchar *channel_name,
                                    GError **error);

The current api also lacks a bit of error handling, so errors in
xfconf_channel_remove_property for example

gboolean xfconf_channel_remove_property(XfconfChannel *channel,
                                    const gchar *property,
                                    GError **error);

Was the property not removed because it does not exist? Or not allowed
because of kiosk mode? stuff like that. Macros to read channel stuff
XFCONF_CHANNEL_IS_WRITEABLE() could be useful too.

Just my 0.02,

More information about the Xfce4-dev mailing list