Hi Inspired by Petri's example [1] I almost succeeded in creating a Python based PopupApplet without instantiating ExtenderItems. The only problem is that in order for the Applet to actually popup when clicked on in the panel, I have to first add it to the desktop and then drag it to the panel :-/
In metadata.desktop I have ServiceTypes=Plasma/PopupApplet. I have overloaded graphicsWidget() which creates the GUI and widget() which simply calls graphicsWidget(). Had to use both of them because either I got a TypeError or neither got called. I also had to call setGraphicsWidget() and setPopupIcon(). All of this works excellent but only if the Plasmoid was first added to the desktop. From reading the source of the C++ implementation [2] I can see that the panel-icon-widget's (or whatever it's called) clicked() signal gets connected to a private method internalTogglePopup() but for some reason that doesn't happen when it is added directly to the panel. Am I missing something or will I have to reimplement everything in Python - which seems a bit silly ;-) [1] http://websvn.kde.org/trunk/KDE/kdeexamples/plasma/python/applets/pyhello/ [2] http://websvn.kde.org/trunk/KDE/kdelibs/plasma/popupapplet.cpp?view=markup PS: Sorry for the X-post but it kinda overlaps both lists. PSS: Do say if you need actual code then I'll make a simplified example. -- Best Regards / Med venlig hilsen Thomas Olsen
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel