plugin writing problem

Jasper Huijsmans jasper at xfce.org
Tue Dec 20 22:30:26 CET 2005


Adriano Winter Bess schreef:
> Hi,
> 
> I've just started to write a plugin for the Xfce panel to display
> gnome applets. One of the problems I'm facing is that since the gnome
> applets use the bonobo infra-structure, my plugin needs to setup the
> bonobo system during initialization. This means I have to call the
> 'bonobo_init' function, which needs the argc and argv parameters of
> the main function (please refer to the bonobo documentation at Gnome
> site).
> 
> Well, the problem is that if I use the
> XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL macro I can't pass argc and argv
> to bonobo_init. What I decided to do was not to use the macro, but
> instead rewrite it in order to call the "bonobo_init" function.
> Anyway, this seems sort of a bad hack.
> 

That is probably the only way to do it, and should be fairly safe, since 
I don't plan to change that macro any time soon. I don't expect many 
other people to want to use bobobo, so I'm a bit reluctant to change the 
API.

> What I'd like to know is if there's any other way I can get argc and
> argv using the XfcePanelPlugin API (I couldn't find it) since
> xfce_external_panel_plugin_new gets argc and argv as parameters. Any
> sugestions are welcomed.
> 
> Regards,
> Adriano

	Jasper




More information about the Xfce4-dev mailing list