discrepancy in python bindings for plasma

Aaron J. Seigo aseigo at kde.org
Thu Feb 19 23:18:39 CET 2009


On Thursday 19 February 2009, Benjamin Kleiner wrote:
> On Thursday, 19. February 2009 16:55:38 Thomas Coopman wrote:
> > I have been running in the same problem and have looked a bit at the code
> > and it looks like createConfigurationInterface is not in AppletScript so
> > there are some changes needed to solve this.
> >
> > But if it is possible to use showConfiguration and get the same dialog I
> > would like to know how too.
>
> Well, the following code emulates the wanted behaviour relatively well:
>
> 	def showConfigurationInterface(self):
> 		dialog = KPageDialog()
> 		dialog.setFaceType(KPageDialog.List)
> 		dialog.setButtons( KDialog.ButtonCode(KDialog.Ok | KDialog.Cancel) )
> 		#The assignment of actions to the buttons happens in
> createConfigurationInterface(), as proposed.
> self.createConfigurationInterface(dialog)
> 		dialog.exec_()
>
> It works nice, but you currently have to rewrite it every time you make a
> new applet, which is kind of annoying.

ah, so this is a shortcoming of the python scriptengine ... which in turn is a 
limitation in AppletScriptEngine in that you can't get the "standard" Plasma 
config dialog from there. som

ething like the attached patch which could then be used by the python engine 
to provide a nice method in the interpreter (e.g. 
createConfigurationInterface)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software

-------------- next part --------------
A non-text attachment was scrubbed...
Name: appletscript_access_to_standard_dialog.diff
Type: text/x-patch
Size: 3105 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090219/2bf734f6/attachment-0001.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090219/2bf734f6/attachment-0001.sig 


More information about the Plasma-devel mailing list