Merging settings by group in KConfig

Matt Rogers mattr at kde.org
Mon Apr 3 16:49:02 BST 2006


On Mon, Apr 03, 2006 at 08:27:33AM -0600, Aaron J. Seigo wrote:
> On Sunday 02 April 2006 14:13, Matt Rogers wrote:
> > Specify a group of settings which should be used as default settings for a
> > particular thing. Then, allow other groups to derive their settings from
> > that group. If a certain configuration key is not present in the derived
> > group, the default setting takes over. Otherwise, the derived group has
> > precedent.
> 
> do these defaults need to be dynamic? or could this be accomplished by 
> extending KConfigXT to be "settings group aware"?
> 

Yes, the defaults need to be dynamic but I'm not sure what you mean by
"settings group aware". My vision was being able to have a KConfig file
that looked like:

[Chatwindow][$d]
Key1=Value1
Key2=Value2
OverriddenKey=Default

the "[$d]" specifies Defaults, similar to "[$i]" for immutable.
When the user changes the appropriate setting, this gets
written to the local KConfig file:

[Chatwindow:FooContact]
OverriddenKey=NotDefault

the colon is just a separator and can be some other character. I don't
care necessarily about the separator used.

When reloading the config, the defaults get read first, then the settings for a
particular scenario get read. The defaults could be in the same file as the 
per scenario settings. The user should be allowed to change the 
defaults (i.e. rich text on or off, automatic spell checking on or off, etc.) 
and have those written back to the KConfig file as well.

> if it needs to be dynamic, would it be enough to have "local global" settings 
> by having more than one user-local set of configurations that are then merged 
> ala kdedirs?
> 

--
Matt





More information about the kde-core-devel mailing list