discrepancy in python bindings for plasma

Richard Dale richard.j.dale at gmail.com
Sun Feb 22 17:17:57 CET 2009


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.

In my opinion hasConfigurationInterface(bool) is wrong and instead it should
take an enum to mean 'no config interface', 'kde config interface' or 'alien
config interface'. Then according to what was passed when the plasma runtime
invokes a hook for the scriptengines config dialog it should call a
different one for alien conf dialogs.

-- Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20090222/07db84f0/attachment.htm 


More information about the Plasma-devel mailing list