[Panel-devel] Applet updating
Aaron J. Seigo
aseigo at kde.org
Sun Sep 16 21:25:10 CEST 2007
On Sunday 16 September 2007, Petri Damsten wrote:
> On Sunday 16 September 2007 20:19:36 Aaron J. Seigo wrote:
> > right; so this would be for buggy engines that don't create the source in
> > sourceRequested. the engine should be fixed in this case (to return
> > false, or create the source). working around that bug in a given engine
> > would mean that we'd be breaking the internal semantics of DataEngine
> > (that sourceRequested is where the source gets created on demand, if at
> > all).
> >
> > for now, i'd prefer to leave it the way it is.
>
> OK. Still feels a little confusing to me. DataEngines like TimeEngine
> don't 'create' source just call setData and there doesn't seem to be
> function to just create one if you don't have data (other than calling
> setData with some empty values)
creation is, of course, implied by setData ... this is nicer than having to
explicitly create sources and then set the data on them as it avoids "if
(!exists(source)) { createSource(source); ..." type code.
i do see how it is not immediately obvious, though. you have to read the
apidox quite carefully and/or stub your toe on it. perhaps some debug output
warning about this might help?
> > does the attached patch work for you? (i can't test right now as my
> > libplasma is not in a compilable state atm)
>
> Seems to work. Should I commit this with the #4 of the original diff.
yes, please =)
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
-------------- 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/panel-devel/attachments/20070916/8396ce08/attachment.pgp
More information about the Panel-devel
mailing list