Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 executesglib-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 apath
The
schema
for example isorg.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.