Re: Python plasmoid works in plasmoidviewer but not in Plasma

2012-04-03 Thread Sebastian Kügler
On Sunday, April 01, 2012 17:58:31 Alex Dancu wrote: > Thanks, it worked. > > Is there a variable or something that I can check at runtime to see if > my plasmoid is running in plasmoidviewer or not? That's definitely not recommended. You'll want to make your code work if there are sources alre

Re: Python plasmoid works in plasmoidviewer but not in Plasma

2012-04-01 Thread Alex Dancu
Thanks, it worked. Is there a variable or something that I can check at runtime to see if my plasmoid is running in plasmoidviewer or not? if in_plasmoidviewer: self.connect(self.lmSensorsEngine, SIGNAL('sourceAdded(const QString &)'), self, SLOT('addSource(const QString &)')) else:

Re: Python plasmoid works in plasmoidviewer but not in Plasma

2012-03-31 Thread Shaun Reich
because when it's in plasma-desktop, all of the sources are already created. but in plasmoidviewer, it's starting everything from scratch. i'm guessing that's the problem, so you just need to iterate over dataengine::sources() on init. -- Shaun Reich, KDE Software Developer (kde.org)

Python plasmoid works in plasmoidviewer but not in Plasma

2012-03-31 Thread Alex Dancu
Hi, I'm trying to write a plasmoid which displays lmsensors information using the systemmonitor dataengine, and I have this issue. Since I don't know the available sensors name, I connect the sourceAdded() signal of the dataengine to a slot called addSource() where I actually call connectToSo