[PATCH] Add signals support to kconfig_compiler

Michaël Larouche michael.larouche at kdemail.net
Thu Feb 2 01:24:39 GMT 2006


Le February 1, 2006 18:33, Cornelius Schumacher a écrit :
> On Tuesday 31 January 2006 16:03, Michaël Larouche wrote:
> > This patch add support for signals in kconfig_compiler. What does it
> > means ? It means that a changed entry can emit a signal to dispatch it to
> > another component.  I needed it in Kopete to replace a old hand-made
> > configuration class.
>
> In principle I think this is an useful feature.
>
> > First you need to define a list of signals in the configuration file like
> > this.
> > <kcfg>
> > <signal name="emoticonSettingsChanged" />
> >
> > <signal name="styleChanged">
> >   <label>Tell when a complete style change.</label>
> >     <argument type="String">stylePath</argument>
> >     <argument type="String">StyleCSSVariant</argument>
> > </signal>
> > </kcfg>
> >
> > After, add to the entry the signal to emit:
> > <entry key="stylePath" type="String">
> >   <label>Absolute path to a directory containing a Adium/Kopete chat
> > window style.</label>
> >   <emit signal="styleChanged" />
> > </entry>
>
> Why do you need to define the signal at all? Couldn't we just add an
> attribute 'signal="true"' to the "entry" element and then automatically
> deduce a signal "<entryname>Changed" which is emitted when the entry with
> the name <entryname> is changed?

I define signals to get a flexibity. Maybe multiple entries would want to emit 
the same signal. And that same signal would maybe need to pass more than one 
argument.

> It might also be useful to add a signal which is emitted when any of the
> entries is changed, so that apps which aren't interested in the full
> granularity of changes still can react on changes.

Yeah, this could be a entry in the .kcfgc file.

> > Patch included also fix to reference files(to make tests pass), the new
> > test files, modifications to build system (automake and CMake), addition
> > to the Doxygen files.
>
> I haven't looked into all details of the patch, but I'm impressed by the
> completeness (updating all the docs, etc.) :-)

Thank you :) Also the .xsd is updated but SVN considers it as a binary file, 
weird.
-- 
Michaël Larouche
KDE developer working on Kopete, Kamefu, Solid...on dial-up :P
--------------------------------------
Blog: http://mlarouche.blogspot.com/
MSN/Email: michael.larouche at kdemail.net
IRC: irc.freenode.org/DarkShock on #kopete,#solid,#kamefu,#plasma
Jabber: darkshock at myjabber.net
-------------- 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/20060201/672b586a/attachment.sig>


More information about the kde-core-devel mailing list