programmatically adding panel plugins

Nick Schermer nickschermer at gmail.com
Sat Aug 4 10:04:07 CEST 2007


2007/8/3, Brian J. Tarricone <bjt23 at cornell.edu>:
> Thinking about configuration...  I feel like these new types of plugins
> don't have to be persistent: that is, they aren't saved in the panel's
> configuration, and the panel itself does not re-add them on a panel
> restart.  The _add_external() plugins probably could be added to the
> config, but then that raises other problems for the app[1].  The
> _add_foreign() plugins can't be saved, because the panel has no idea how
> to instantiate them.
>
> So, the controlling app will need to maintain some panel-related
> configuration, so I'd also need:
>
> guint xfce_panel_plugin_get_panel_number(XfcePanelPlugin *plugin);
> guint xfce_panel_plugin_get_position(XfcePanelPlugin *plugin);
>
> Anything else...?

Maybe it's better to let the panel decide where to put the plugin,
based on whether the panel is hidden, on the current monitor, next to
the system tray if there is one (<-- I'd exspect that).
Based on the last point, it might be better to extend the system tray
plugin to support this, because that's what you want: more advanced
'tray icons'.

GtkContainer *xfce_panel_status_container_new (void);
gboolean xfce_panel_has_system_tray ();

and some xfce_panel_status_container_{get,set}_{size,visible}
functions like Gtk has for the GtkStatusIcon.

Maybe all this is already possible with the system tray protocol, but
just not user-friendly, because status icons are in fact small windows
IIRC. If so, we can create an object to handle this type of system
tray icons and rewrite the system tray code (which needs some time
anyway) to support this.

Nick



More information about the Xfce4-dev mailing list