[PyKDE] Re: Panel applets with PyKDE/Python

Jim Bublitz jbublitz at nwinternet.com
Tue Aug 19 19:57:01 BST 2003


On Tuesday August 19 2003 07:17, Frederick Polgardy Jr wrote:
> On Tuesday 19 August 2003 03:45 am, Hans-Peter Jansen wrote:
> > On Tuesday 19 August 2003 03:06, Jim Bublitz wrote:
> > > It's bug 62859 - go to bugs.kde.com, vote early and vote
> > > often (I

> > http://bugs.kde.org/show_bug.cgi?id=62859

> It almost seems to be that this should be generalized to
> support other sets of language bindings that will inevitably
> run into the same kind of problem.  I.e. use a generic name
> like X-KDE-ScriptName -- or even more generically,
> X-KDE-ExtraArgs or something -- in the .desktop file, which
> will tell KDE to pass some additional args along to the .so
> (any .so) to tell it what to go do with itself.  Not sure what
> API ramifications this will have though.

> Anyway, just a thought....

You're right on both counts (general name, extra args) and there 
should be a way to look at what tags are in the .desktop file 
and call an 'init' function (it's in C, so no default arg 
values) with the correct signature. That should maintain 
compatibility. I believe you can post additional comments on the 
"bug" at bugs.kde.org, and I'd urge you to do that.

I was only interested in solving the immediate problem. There are 
a few other things that would be helpful with the whole applet 
loading process (and that applies to KDE plugins generally). For 
example, I had to subclass KPanelApplet just so I could pass it 
a pointer to the Python interpreter object, and then have it's 
destructor shut down the interpreter. It seems like in addition 
to 'init', it would be nice (for other languages, if not C++) if 
there was also a standardized "finalize" call. I'm not aware of 
any way for a lib to detect when 'dlclose' has called to unload 
the lib. (If I'm wrong, I'd appreciate hearing about it - it 
would simplify things).


Jim




More information about the PyQt mailing list