Review Request: ScriptEngine's as Containments

Aaron J. Seigo aseigo at kde.org
Wed Mar 5 22:24:52 CET 2008


On Wednesday 05 March 2008, Sebastian Sauer wrote:
> > in applet.cpp shouldn't be necessary; since all containments also have
> > Plasma/Applet in their service types list, it will never get to this
> > branch.
>
> It does in the case of SK which does not implement an Applet or Containment
> (or libs for any of them) but only a AppletScript that operates on the
> created "null" Applet/Containment depending on what the X-KDE-ServiceTypes
> defines.

hm.. but if X-KDE-ServiceTypes=Plasma/Applet,Plasma/Containment, then these 
two queries:

KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
KServiceTypeTrader::self()->query("Plasma/Containment", constraint);

will both return the item, no?

but since Containment IsA Applet and the containment behaviour is only 
activated when:

a) Corona calls setIsContainment(true), and
b) the object is used to group applets (e.g. things like setLocation, etc are 
called)

then this probably works? though i'm not sure how exactly since 

of course, if X-KDE-ServiceTypes=Plasma/Containment then the first query will 
fail and the second will kick in.

what may be needed is a way to tell Applet::load to return a Containment 
rather than an applet.

i see you have committed (huzzah!) so i'll play with this a bit and see what i 
come up with.. the compiler is usually more accurate than my eyes ;)

-- 
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: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080305/25a426a8/attachment-0001.pgp 


More information about the Panel-devel mailing list