Merging settings by group in KConfig
Stefan Nikolaus
stefan.nikolaus at kdemail.net
Mon Apr 3 17:27:53 BST 2006
Hi,
On Monday 03 April 2006 17:49, Matt Rogers wrote:
> 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
Just a quick guess:
<group name="ChatWindow">
<entry name="OverriddenKey">
<default>Default</default>
</entry>
</group>
<group name="ChatWindow-FooContact">
<entry name="FooContactOverriddenKey" key="OverriddenKey">
<default code="true">overriddenKey()</default>
</entry>
</group>
Does this solve your problem?
Bye,
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060403/574022cc/attachment.sig>
More information about the kde-core-devel
mailing list