discrepancy in python bindings for plasma

Chani chanika at gmail.com
Sun Feb 22 20:27:17 CET 2009


On February 22, 2009 08:17:57 Richard Dale wrote:
> 2009/2/20 Aaron J. Seigo <aseigo at kde.org>
>
> > On Friday 20 February 2009, Richard Dale wrote:
> > > Yes, but how does that differ from just adding
> > > createConfigurationInterface() to the scripting api in addition to
> > > showConfigurationInterace()?
> >
> > because that would only work nicely for the Python and Ruby script
> > engines. for everything else, there'd be more code still required. saving
> > a couple lines in the Python/Ruby engines by making AppletScriptEngine
> > more specific to
> > their design patterns doesn't really fit with the idea that the engine
> > parent
> > class is trying quite purposefully to not dictate or prescribe API.
> >
> > the Python and Ruby engines take the "we are binding libplasma, KDE and
> > Qt" approach, which is just fine and completely appropriate.
> >
> > that is not, however, the goal of AppletScriptEngine.
>
> Well it isn't about code ('the C++ api'), it is about UI consistency. There
> are three type of plasma applets; native C++, kde scriptengine and alien
> (such as Apple dashboard or google widgets). It is important for the kde
> based scriptengines to have consistent behaviour in their configuration
> dialogs (you know 'DRY' meaning do not repeat yourself), but reimplementing
> showConfigurationInterface() in every binding violates that principle.

have you looked at the javascript bindings? they don't reimplement anything. 
there's just a configChanged function that gets called when the config has been 
saved. there used to be a showConfigurationInterface() in 
SimpleJavaScriptApplet that was never ever called, and I deleted it.

however, the config dialogs it gets are not perfectly consistent with c++ 
ones... the apply button works and the title at the top has a different 
wording.

-- 
This message brought to you by eevil bananas and the number 3.
www.chani3.com
-------------- 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/20090222/2baba003/attachment.sig 


More information about the Plasma-devel mailing list