Detecting plasmoid in use

Martin Klapetek martin.klapetek at gmail.com
Tue Jul 5 12:29:15 CEST 2011


On Tue, Jul 5, 2011 at 00:52, Shaun Reich <predator106 at gmail.com> wrote:

> On Mon, Jul 4, 2011 at 2:07 PM, Martin Klapetek
> <martin.klapetek at gmail.com> wrote:
> >The plasmoid is pure QML, therefore we can't do any dbus
> > magic directly with it (or can we?).
>
> Well, remember, JS == QML, basically. So I don't see why not...
>

Is there any pure QML plasmoid using dbus? I'd be interested in this..


>
> > So I'd like to know - is there any way that we can detect if the plasmoid
> is
> > in use from any KApp and not depend on Plasma libs?
>
> A dbus interface sounds the most reasonable, here -- in that case.
>
> >And related question is the dataengine in use only when the plasmoid is
> active?
>
> In general I'd say yes, although it depends on what you are referring
> to when you say "active". DataEngines do not exist until they are
> called upon. When they are no longer being used (e.g. applet dies)
> they will die as well.
>
> >If so, is it "safe" (in terms that we can rely on it 100%) to export some
> activity
> > indicator from the dataengine on dbus?
>
> That would be fine. Other dataengines create dbus interfaces as well,
> so you are not alone in your need.
>

The thing that concerns me is that if the dataengine is created without the
plasmoid, we'd get a false positive, which is unwanted. Also, the refCount
in Plasma::DataEnginePriv would be very usefull if exposed to child classes
of Plasma::DataEngine ;)

--Marty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20110705/f511a962/attachment.htm 


More information about the Plasma-devel mailing list