plasma application policies

Richard Dale richard.j.dale at gmail.com
Wed Aug 5 15:10:40 CEST 2009


On Tue, Jul 28, 2009 at 10:07 PM, Aaron J. Seigo<aseigo at kde.org> wrote:
> On Tuesday 28 July 2009, Richard Dale wrote:
>> On Tue, Jul 28, 2009 at 2:32 AM, Aaron J. Seigo<aseigo at kde.org> wrote:
>> > the script engine situation is probably the easiest of the bunch: just
>> > add a method to the script engine that states what it does with
>> > configuration (e.g. setProvidesCustomizedConfiguration(bool)) and query
>> > that when deciding what to do with the configuration action.
>>
>> I would like something like this so that Google Gadgets etc can return
>> 'yes' and scripts engines like Ruby or Python that want KDE dialogs
>> can return 'no'.
>
> that would be the idea indeed.
>
>> I noticed that a global shortcuts page is now in the standard dialog,
>> and have translated the code for that to Ruby but not commited it yet.
>> I can't use the C++ implementation because the methods are private.
>
> there is this in AppletScriptEngine:
>
>  KConfigDialog *standardConfigurationDialog();
>
> so you can get the standard dialog and then pass that on to the Ruby script to
> add their own pages to.
The problem with this is that there is no
createConfigurationInterface() callback/virtual method override in the
script engine. This means that the custom pages for a scripted
plasmoid don't get added until the dialog has been created with a
keyboard shortcut page already added. So instead of the keyboard
shortcut page being last, it will be first. The attached patch adds
another method to appletscript.h, addGlobalShortcutsPage() which
allows the script engine code to call back into the scripting code in
between creating the dialog with standardConfigurationDialog() and
adding the shortcut page.

It also moves a few things around in applet.cpp, so that the code for
shortcuts is all in Applet::addGlobalShortcutsPage() including the
connect() calls to the configDialogFinished() slot to handle
completing the dialog.

-- Richard

> --
> 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
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plasma_scripting_dialog.patch
Type: text/x-diff
Size: 2962 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090805/3d18cc85/attachment.bin 


More information about the Plasma-devel mailing list