[Kde-bindings] KDE/kdebindings

Richard Dale rdale at foton.es
Mon May 12 11:59:48 UTC 2008


On Monday 12 May 2008 12:41:50 Arno Rehn wrote:
> > I need to understand the package format a bit more, because you need to
> > write code that describes the layout of a package (also possible in
> > Ruby). The big problem is that the scripting api doesn't give you any way
> > to access KConfig stuff, and not being able to read and write config data
> > is a bit of a show stopper. I may need to cheat for now to work round
> > that until there is an 'official' way of doing it.
>
> Well, nothing prevents you to require Korundum in your ruby script. AFAIK
> that has nothing to do with wheter you write a plasma script or a ruby app.
> The scriptengine api provides popupConfigDialog (or similar, forgot the
> correct name..), so there should be a possibility to do that kind of stuff.
Yes, the plasma applet support will need kde classes from Korundum. 

The problem is that the api for scripting applets is supposed to be based on 
the kdebase/workspace/libs/plasma/scripting/appletscript.h header which 
defines the interface between a scripting applet and the plasma runtime. The 
is no way to access the Plasma::Applet::config() method via that interface - 
it isn't a problem of not having the KConfig* classes in the Ruby binding. It 
does have this method:

virtual void showConfigurationInterface();

But there is no hook in there to allow you to access the config stuff. However 
it is possible to get at the underlying real c++ applet for the scripting 
engine via Plasma::AppletScript::applet() and call that config() method on 
that. So until there is a proper api available, I'll do that - applets which 
you can't configure are just too limited.

-- Richard




More information about the Kde-bindings mailing list