cream/python-cream — pull request #8 by kkris (2011-11-03 21:59:13+00:00)
Title: Port cream.config gsettings

So, this is a work in progress port from gpyconf to gsettings and not ready to be merged yet, thus open for discussion here.

*How to test:*
change in to the cream/config dir and type ``make settings`` which copies the gschema.xml file to ``/usr/share/glib-2.0/schemas/`` and then executes ``glib-compile-schemas`` , so that gsettings can find it.
Then run ``python __init__.py`` which currently doesn't offer the API it should, but serves testing purposes.

Now to some implementation details:

As it turns out GSettings is actually quite suitable for our needs, which is mainly different seperated profiles and fast access. Each Configuration is identified by the ``schema`` and a ``path``
The ``schema`` for example is ``org.cream.melange`` and each schema can have different paths, like ``/Default`` , ``/foobar`` , etc which represents our profiles. A change to a setting with the path ``/A`` does not change the setting in path ``/B``

There are still some open questions, like what to do about our static keyword and some setting properties like min/max for number settings.
Also, right now every gschema.xml must contain two keys (profiles and profile-selected) which are used to save the profile names and whether or whether not this profile is currently selected. I'm not particular happy with that, hopefully there is a better solution.

Not implemented but not that difficult to add is the multioption and list setting.