Hello, as I said, I've been trying to hack in support for PopupApplets in Python. This patch is a first version of such a thing, which at least enables the proper binding when used scripted applets.
It needs some review, as I'm unfamiliar on how PopupApplets work, and if I'm doing the right thing (still new at these things), especially the Python bindings people (Simon, which is CCed here). The initializing code is a cut and copy paste from Applet, just modified to accept extra arguments. It works, or seems to work. I haven't been able to test it for real as there is no clean, simple PopupApplet implementation which I could use as reference. In any case, comments welcome.
Index: plasmascript.py =================================================================== --- plasmascript.py (revision 1093442) +++ plasmascript.py (working copy) @@ -98,6 +98,21 @@ def saveState(self, config): pass +class PopupApplet(Applet): + + def __init__(self, parent=None, *args): + # this should be set when the applet is created + Applet.__init__(self, parent, *args) + self.applet = None + self.applet_script = None + self._forward_to_applet = True + + def graphicsWidget(self): + pass + + def widget(self): + pass + ########################################################################### class DataEngine(QObject): def __init__(self, parent=None):
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