Merge lp://staging/~compiz-team/compiz-libcompizconfig/compiz-libcompizconfig.settings_upgrades into lp://staging/compiz-libcompizconfig
Status: | Merged |
---|---|
Merged at revision: | 413 |
Proposed branch: | lp://staging/~compiz-team/compiz-libcompizconfig/compiz-libcompizconfig.settings_upgrades |
Merge into: | lp://staging/compiz-libcompizconfig |
Diff against target: |
3661 lines (+1516/-832) 9 files modified
backend/src/ini.c (+17/-13) include/ccs.h (+110/-18) plugin/ccp/src/ccp.cpp (+19/-10) plugin/ccp/src/ccp.cpp~ (+0/-536) src/ccs-private.h (+16/-0) src/compiz.cpp (+34/-2) src/ini.c (+134/-65) src/lists.c (+28/-7) src/main.c (+1158/-181) |
To merge this branch: | bzr merge lp://staging/~compiz-team/compiz-libcompizconfig/compiz-libcompizconfig.settings_upgrades |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jason Smith (community) | Approve | ||
Review via email: mp+68991@code.staging.launchpad.net |
Commit message
Added settings upgrade framework.
Store settings upgrades in SYSCONFDIR/
format
org.
Where org.freedesktop
eg org.freedesktop
series (listed in incremental order) and profile is the name of the profile
which should be active when changing settings.
Upgrades will be processed in alphabetical order and then written to a file
in XDG_CONFIG_
skipped in the future.
The upgrade file format follows something along the lines of a diff file
inlined into the ini file, for example
[plugin]
+s0_option_name = foo;
-s0_
The following is the syntax of the upgrade file:
+ with a value will replace the existing value with the specified one
- with a value will clear the existing value to the default value if
the value specified in the value section of the key matches the actual
value that the user has set
both + and - for a particular option key name will replace the value
if the value that the user has set matches the value section specified
in the - value field
For lists, + and - will not overwrite or clear to default, but rather append
and subtract from list themselves.
+ with a value will append all non-duplicate entries to the existing list
- with a value will subtract all matched entries from the existing list
both + and - for a particular list will replace the list only if the entire
list matches what was specified in the - field
Description of the change
Added settings upgrade framework.
Store settings upgrades in SYSCONFDIR/
format
org.
Where org.freedesktop
eg org.freedesktop
series (listed in incremental order) and profile is the name of the profile
which should be active when changing settings.
Upgrades will be processed in alphabetical order and then written to a file
in XDG_CONFIG_
skipped in the future.
The upgrade file format follows something along the lines of a diff file
inlined into the ini file, for example
[plugin]
+s0_option_name = foo;
-s0_
The following is the syntax of the upgrade file:
+ with a value will replace the existing value with the specified one
- with a value will clear the existing value to the default value if
the value specified in the value section of the key matches the actual
value that the user has set
both + and - for a particular option key name will replace the value
if the value that the user has set matches the value section specified
in the - value field
For lists, + and - will not overwrite or clear to default, but rather append
and subtract from list themselves.
+ with a value will append all non-duplicate entries to the existing list
- with a value will subtract all matched entries from the existing list
both + and - for a particular list will replace the list only if the entire
list matches what was specified in the - field
You can test this with the following:
bzr branch lp:~smspillaz/+junk/compizconfig-test
That is a simple test prog which will init and deinit compizconfig. Maybe it can test the whole API in the future.
Two settings upgrades files can be found here:
http:// smspillaz. ucc.asn. au/compiz/ tests/compizcon fig-settings- upgrades/ upgrades/
cp them into /etc/compizconf ig/upgrades and they will be processed the next time you start a compizconfig utility