<div class="gmail_quote">On Wed, Jul 6, 2011 at 10:34, Aaron J. Seigo <span dir="ltr"><<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
> So I'd like to know - is there any way that we can detect if the plasmoid is<br>
> in use from any KApp and not depend on Plasma libs? And related question -<br>
> is the dataengine in use only when the plasmoid is active? If so, is it<br>
> "safe" (in terms that we can rely on it 100%) to export some activity<br>
> indicator from the dataengine on dbus?<br>
<br>
</div>the DataEngine is loaded on demand only (otherwise, think about it: every<br>
DataEngine would be loaded on desktop start..), and when the last user of it<br>
goes away the DataEngine is deleted. remember that there can be more than one<br>
instance of your plasmoid, so the DataEngine is a much more direct and safe<br>
way to go.<br></blockquote><div><br></div><div>Mostly just for the archiving record and as a thank-you-response - we went down this road and it works like a charm. Thanks.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
a DataEngine can also determine if something is connected or not and therefore<br>
know itself if it is unused and just sitting there. it should, with the<br>
reference counting, just be deleted, however. so using that is probably the<br>
easiest way forward and works reliably with plasmoids.<br>
<br>
one wrinkle, however: keep in mind that right now DataEngines are in-process,<br>
so if i load the plasmoid in plasma-desktop and again in plasma-windowed or<br>
plasma-overlay (the screensaver widgets) then there will be more than one<br>
instance of the DataEngine running globally on that system.<br></blockquote><div><br></div><div>Luckily that does not have to concern us as we need at least one, ie. "one or more", so we should be fine :)</div>
<div><br></div><div>Thank you</div><div>--</div><div>Marty K.</div></div>