Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port cream.config gsettings #8

Open
wants to merge 1 commit into
base: fec8127^
Choose a base branch
from
Open

Port cream.config gsettings #8

wants to merge 1 commit into from

Conversation

kkris
Copy link
Member

@kkris kkris commented Nov 3, 2011

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.

This commits drops gpyconf as the settings backend and instead uses
gsettings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant