[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Python Applet and configChanged
From: Petri =?iso-8859-1?q?Damst=E9n?= <petri.damsten () gmail ! com>
Date: 2009-05-26 9:20:02
Message-ID: 200905261220.08675.petri.damsten () gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
Hi,
Testing python applet and noticed that configChanged is not forwarded to
python applets (attached diff).
Currently configChanged is called multiple times at start and at config dialog
close. Should Plasma take care of calling configChanged just once in these
situations?
plasmoidviewer with python applet start (configChanged called 4 times):
main.py __init__
main.py init
main.py constraintsEvent
main.py constraintsEvent
main.py constraintsEvent
plasmoidviewer(18498) KCoreConfigSkeleton::writeConfig:
plasmoidviewer(18498)/libplasma Plasma::Applet::configChanged: KConfigSkeleton
main.py configChanged
plasmoidviewer(18498) KCoreConfigSkeleton::writeConfig:
plasmoidviewer(18498)/libplasma Plasma::Applet::configChanged: KConfigSkeleton
main.py configChanged
main.py constraintsEvent
plasmoidviewer(18498) KCoreConfigSkeleton::writeConfig:
plasmoidviewer(18498)/libplasma Plasma::Applet::configChanged: KConfigSkeleton
main.py configChanged
plasmoidviewer(18498) KCoreConfigSkeleton::writeConfig:
plasmoidviewer(18498)/libplasma Plasma::Applet::configChanged: KConfigSkeleton
main.py configChanged
config dialog ok pressed after changing data (configChanged called 3 times):
plasmoidviewer(18498) KCoreConfigSkeleton::writeConfig:
plasmoidviewer(18498)/libplasma Plasma::Applet::configChanged: KConfigSkeleton
main.py configChanged
plasmoidviewer(18498)/libplasma Plasma::AppletPrivate::configDialogFinished:
plasmoidviewer(18498)/libplasma Plasma::Applet::configChanged: KConfigDialog
main.py configChanged
plasmoidviewer(18498)/libplasma Plasma::AppletPrivate::configDialogFinished:
plasmoidviewer(18498)/libplasma Plasma::Applet::configChanged: KConfigDialog
main.py configChanged
Petri
["configchanged.diff" (text/x-patch)]
Index: python/pyappletscript.py
===================================================================
--- python/pyappletscript.py (revision 972647)
+++ python/pyappletscript.py (working copy)
@@ -40,7 +40,7 @@
# on either; it might have been changed in the module itself)
self.m_moduleName = str(self.applet().pluginName())
#print("pluginname: " + str(self.applet().pluginName()))
-
+
self.plugin_name = str(self.applet().pluginName()).replace('-','_')
PythonAppletScript.importer.register_top_level(self.plugin_name, \
str(self.applet().package().path())) @@ -74,6 +74,11 @@
#print("Script: showConfigurationInterface")
self.pyapplet.showConfigurationInterface()
+ def configChanged(self):
+ if not self.initialized:
+ return
+ self.pyapplet.configChanged()
+
def paintInterface(self, painter, option, contentsRect):
if not self.initialized:
return
["signature.asc" (application/pgp-signature)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic