Detecting plasmoid in use

Martin Klapetek martin.klapetek at gmail.com
Wed Jul 13 14:02:06 CEST 2011


On Wed, Jul 6, 2011 at 10:34, Aaron J. Seigo <aseigo at kde.org> wrote:
>
>
> > 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? And related question
> -
> > is the dataengine in use only when the plasmoid is active? If so, is it
> > "safe" (in terms that we can rely on it 100%) to export some activity
> > indicator from the dataengine on dbus?
>
> the DataEngine is loaded on demand only (otherwise, think about it: every
> DataEngine would be loaded on desktop start..), and when the last user of
> it
> goes away the DataEngine is deleted. remember that there can be more than
> one
> instance of your plasmoid, so the DataEngine is a much more direct and safe
> way to go.
>

Mostly just for the archiving record and as a thank-you-response - we went
down this road and it works like a charm. Thanks.


> a DataEngine can also determine if something is connected or not and
> therefore
> know itself if it is unused and just sitting there. it should, with the
> reference counting, just be deleted, however. so using that is probably the
> easiest way forward and works reliably with plasmoids.
>
> one wrinkle, however: keep in mind that right now DataEngines are
> in-process,
> so if i load the plasmoid in plasma-desktop and again in plasma-windowed or
> plasma-overlay (the screensaver widgets) then there will be more than one
> instance of the DataEngine running globally on that system.
>

Luckily that does not have to concern us as we need at least one, ie. "one
or more", so we should be fine :)

Thank you
--
Marty K.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20110713/07604abc/attachment.htm 


More information about the Plasma-devel mailing list