[xfconf] Implementing Schema's / using GSettings

Andrzej ndrwrdck at googlemail.com
Fri Jan 20 09:58:11 CET 2012


On 01/20/2012 12:11 AM, Stephan Arts wrote:
>
> I would like to discuss the following scenarios with you guys
> regarding the development of xfconf.

Stephan, I'm not experienced with xfconf (or gsettings/dconf) but wanted 
to share my opinion with you nevertheless.

I am assuming that Xfce is going to adopt GSettings/dconf someday - 
that's the impression I got from googling some past discussions/blog 
posts related to this topic. That is xfconf was created because there 
wasn't other solution available at the time.

I think you should plan features and changes to the framework with a 
future transition to GSettings in mind. That is:

Phase 1: (In 4.10?) Modify xfconf to act (at the API level) as if 
schemas were available. At the backend level you can set up some 
additional channels for handling this information but this should be 
abstracted out from the applications. In particular, applications not 
using this API should behave as if there was no schema (any mismatches 
should be signaled as warnings).

Something like:

$ cat xfwm4-schema.xml
<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfwm4-schema" version="1.0">
   <property name="general" type="empty">
     <property name="activate_action" type="string" 
default_value="switch" doc="blah">
        <choices>
           <choice value="switch" doc="blah"/>
           ...
        </choices>
      </property>
      ...
    </property>

Another (simpler) variant, would be to postpone some features to phase 2 
(possible choices) and add doc field and perhaps default_value field 
directly to properties. Xfconf would have to be modified to save all 
properties (even those which haven't been set yet).

Phase 2: (In 4.12?) Modify xfconf to use dconf directly + prepare 
migration tools + allow applications use GSettings.

Phase 3: Port applications (one by one) to use GSettings instead of 
xfconf. This can be done at phase 2 or any time later.

The key is to split transition into two phases (#1 and #2) and leave a 
fallback option for apps that haven't been ported yet). Otherwise we'd 
have to do everything in one go and that means no chance for shipping 
this feature in 4.10.


One more question. Does any of these systems (xfconf, dconf, gsettings) 
support centralized/remote configuration management (like in active 
directory)?

Andrzej


More information about the Xfce4-dev mailing list