! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce_external_panel_plugin_new missing
Status:
RESOLVED: WONTFIX
Product:
Xfce4-panel
Component:
Libxfce4panel

Comments

Description dannym editbugs 2011-01-02 17:06:42 CET
Xfce 4.6 had a function xfce_external_panel_plugin_new in order to create a new external panel plugin and wire it up.

This was used in Pyxfce to allow one to write panel plugins in Python.

However, in current GIT, the function is missing.

Instead, there's a file "xfce-panel-macros-46.h" with a 
huge XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL macro which automagically creates a function "main" (among other things) and automatically runs the gtk main loop, both of which is impossible to do in this case.
Comment 1 Nick Schermer editbugs 2011-01-02 18:03:34 CET
Well nothing I'm going to do about it, external plugin the way there were are a dead end and will be removed once most plugins have been ported (which starts after 4.8 has been released). New external plugins are all compiled as libraries and are loaded in the wrapper with X-XFCE-Internal=FALSE in the desktop file.

If python does not allow to create modules (or some other way around this, maybe start in the wrapper, even if it requires some additional code in the wrapper), plugins using pyxfce are not possible anymore.
Comment 2 dannym editbugs 2011-01-02 18:46:05 CET
What is the wrapper?
Comment 3 Nick Schermer editbugs 2011-01-02 20:22:26 CET
Its an executable (a gtkplug) that loads a plugin module (same kind module as the internal plugins, so a libfoo.so). It provides the communication between the panel and the external plugin over dbus. So technically this is the replacement of the 'old' (in the code appended with -46) external plugin executable in libexec, but because plugins are all compiled as modules/libraries, then can be started both internal and external (although for now this is now defined in the desktop file) without recompiling the plugin.

From the plugin's point of view it doesn't know if it runs in the wrapper or inside the panel. However if a plugin crashes it also takes the wrapper down, but the panel will respawn it.

Advantage are (apart from both internal/external), XfcePanelPlugin is now a normal GObject, not an interface, so plugin can be build as GObjects with XFCE_TYPE_PANEL_PLUGIN as parent and I can (in the future) change the panel/wrapper communication and fix bugs without the need of recompiling the plugins.

Relevant code is here:
http://git.xfce.org/xfce/xfce4-panel/tree/wrapper
http://git.xfce.org/xfce/xfce4-panel/tree/panel/panel-plugin-external-wrapper.c

Bug #7051

Reported by:
dannym
Reported on: 2011-01-02
Last modified on: 2011-01-02

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Version:
4.7 (master)

Attachments

Additional information