Re: How to put something in system tray?



On Sun, 2004-02-29 at 15:29, Scott Rubin wrote:
I've been using gaim for a long time now.  It is written with gtk and 
compiles for both windows and linux.  I noticed that whether gaim runs 
in KDE, Gnome, XFCE4, Windows or other os/window managers it always 
manages to successfully put a button in the system tray (notification 
area).  How is this done?  Is it even done using GTK or something else?  
Is it possible to do it in a program written in pygtk?  I'm thinking I 
don't want to write this project in C because it will just make it more 
difficult.  Thanks in advance.

Actually it is very simple to do.  I wrote the first iteration of the
gaim System Tray plugin, transferring from Gnome's proprietary applet
code which had a number of issues.  You can take a look at Rob McQueen's
implementation which is the current plug-in in Gaim.  It should reside
in the plugins/docklet directory.  The eggtrayicon files are the Gtk
files that abstract the XEmbed stuff that does the actual work of
embedding the icon in all the different Linux/Unix DE's.  Windows is a
bit different I believe but I never messed with the windows code.  

As for PyGtk, I don't know if the eggtrayicon stuff has been wrapped yet
but that is what you would need (or some sort of python wrapper to
XEmbed) in order to do it.

Hope that helps a bit.
--
J5






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]