Merging settings by group in KConfig

Matt Rogers mattr at kde.org
Tue Apr 4 13:17:20 BST 2006


On Monday 03 April 2006 11:27, Stefan Nikolaus wrote:
> 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>
>

that won't work. I'm not using KConfigXT
--
Matt




More information about the kde-core-devel mailing list