Merge lp://staging/~compiz-team/compiz-libcompizconfig/compiz-libcompizconfig.fix_874830 into lp://staging/compiz-libcompizconfig

Proposed by Sam Spilsbury
Status: Superseded
Proposed branch: lp://staging/~compiz-team/compiz-libcompizconfig/compiz-libcompizconfig.fix_874830
Merge into: lp://staging/compiz-libcompizconfig
Diff against target: 583 lines (+428/-13)
4 files modified
backend/src/ini.c (+12/-12)
src/CMakeLists.txt (+1/-0)
src/ccs-private.h (+7/-0)
src/main.c (+408/-1)
To merge this branch: bzr merge lp://staging/~compiz-team/compiz-libcompizconfig/compiz-libcompizconfig.fix_874830
Reviewer Review Type Date Requested Status
Tim Penhey (community) Needs Fixing
Review via email: mp+79452@code.staging.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

This is a clear place where we could have tests. There are stand alone methods that have defined behaviour.

Also another reason why I had boolean parameters:

- ccsSetString (setting, value, TRUE);
+ ccsSetString (setting, value, FALSE);

This tells the reviewer exactly nothing.

review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Should I include some sample files in a tests/ directory to demonstrate how the settings upgrade / key renames / default overrides ? They won't be installable at runtime (since we don't want users to accidentally create a profile which will have its key values changed by some testing code), but at least they could be there for example's sake.

> Also another reason why I had boolean parameters:

> - ccsSetString (setting, value, TRUE);
> + ccsSetString (setting, value, FALSE);

> This tells the reviewer exactly nothing.

Yes, that need to be changed to:

enum
{
    WriteSetting,
    SetTemporary
};

Though in reality, CCSSetting needs to be an abstracted class or something since this code really just abuses the structure into storing some temporary data.

Unmerged revisions

425. By Sam Spilsbury

Provide a generic method for system administrators and distributions
to handle renamed keys so that user settings will be transitioned to
the new key names and settings will not be lost.

Provide a file in DATADIR/compizconfig/transitions called your_item.transition
with the following format

oldPluginName oldSettingName newPluginName newSettingName
oldPluginName2 oldSettingName2 newPluginName2 newSettingName2

Keys will then be renamed appropriately.

Note that this requires backend support. If your backend does not support
reading from keys that don't have an installed schema, then those settings
will be erased as soon as the user upgrades since the schema data will be
lost. That includes GSettings at the moment.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: