The eggtray problem
Par jd le vendredi, octobre 3 2008, 11:12 - Free Software - Lien permanent
I still don't know why but many GTK+ applications use something called eggtrayicon. As far as I know, eggtrayicon.c is a file written in 2002 by Anders Carlsson which implements the Freedesktop.org system tray procotol for GTK+ applications.
Problem is that this C file is used in dozens of programs and maybe more, and is a bit bugged. I've already send patches for mail-notification and Audacious. pidgin is the first fixed implementation I found and works quite well. Many other applications are probably affected.
That seems to me like a real problem. Multiple copy of bad code instead of using native GTK+ system tray implementation.
So please stop using this bad implementation…
Commentaires
I don't know if it is the only reason, but it happen that the native GTK+ system tray implementation is less powerfull than the eggtray one :
* The eggtray is a full widget container, you can put in it any widget you wich, for exemple an eventbox, and so react to any gtk signal/X event you may want to look at.
* The GtkStatusIcon is not a widget nor a widget container, so you have no choise but to only react to the three existing signal for it : "activate" "popup-menu" and "size-changed"
Over in Pidgin-land, one reason that we don't use GtkStatusIcon is that we don't depend on Gtk 2.10 yet.
(Whether or not we should is a different matter. :-))
The GtkStatusIcon is pretty new actually. So it can be used more or less just now, with a dependency on Gtk 2.10 of which some refrain.
And the widget point raised is also an important one, albeit depending on the usage of the tray icon...
So it looks like GTK+ lacks a good system tray support, that's bad.
Still the solution is not to use eggtray IMHO but to depends on GTK >= 2.10 or to disable systray sypport on older GTK.
And probably fix the GTK implementation so it can get any widget!
also see bug #420247 (http://bugs.debian.org/cgi-bin/bugr...)
Also, the duplication is ment to be there, since that's the policy on using stuff from the egg library (a kind-of-experimental library in gnome), so it's not weird everyone has his own copy.
It's far from ideal, but that lays in the lack of a decent systray gtk implementation so far (or arguably, still).
For reference:
http://svn.gnome.org/viewvc/libegg/...
Open source projects have the weirdest names...
The reason I didn't switch to gtk status icon is that it doesn't support "middle-clicks", while eggtrayicon does.