Re: GSettings and profiles implementation

On Fri, 2011-01-28 at 13:48 +0100, Javier Hernandez Antúnez wrote:

> With gconf,  we can create, in an arbitrary way, store configuration
> key/values without a pre-defined schema. In gsettings, we assume that
> application knows his own schema and will only work with such schema
> definition.
> At this moment, we want to port profiles implementation to gsettings
> but we don't really know how to implement it because of gsettings'
> philosophy that app knows the related schema.
> In a try for seeing how gnome applications have been fronted this
> profile implementation, I saw gnome-terminal's gsettings migration
> goal bug and they haven't migrated yet because of gsettingslist isn't
> implemented. So, probably, I can imagine a profile implementation
> using lists and/or dictionaries, but, at this moment, these features
> aren't implemented yet.

I'm working on a similar account migration issue for Evolution.

Evolution also keeps account information in GConf in the form of XML
blobs and for years I've wanted to get it out of there and use key files
instead so accounts are much more portable for users.  Transitioning
Evolution to GSettings has now forced the issue.

I started out using the GSettingsKeyfileBackend but ran into the same
type of schema-related issues you're talking about, among other things.
I did come up with a system for working around the schema restrictions,
but eventually decided GSettings is not the right tool for what I wanted
and am now reading and writing key files directly.  That is working much
better for my purpose.

This is not a knock against GSettings, it just took me awhile to realize
I was trying to fit a square peg in a round hole.  Evolution will still
use GSettings for general preferences, just not account information.

It's still a work in progress, but I'm happy to share more details about
my solution if you're interested.  Just wanted to suggest that you think
beyond GSettings.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]