1
Notification area icon as a PyGTK object
2
----------------------------------------
3
This module lets you put a simple icon in a FreeDesktop.org-compatible
4
notification area, and receive the 'activate' event when the left button
5
is pressed, and 'popup-menu' when the right button is pressed.
7
This code was ripped from libegg CVS, and so when it breaks you get
12
(Requires the PyGTK and Python development libraries.)
18
picture = gtk.gdk.pixbuf_new_from_file_at_size("icon.png", 16, 16)
19
icon = statusicon.StatusIcon(picture)
20
icon.connect("activate", toggle_hideshow)
21
icon.set_tooltip("Click to hide or show the main window", "magic")
23
Currently only the pixbuf-based constructor is exposed to Python,
24
and set_tooltip still requires its second argument which I don't
25
actually understand. :) Patches for further functionality
26
appreciated, but I only implemented what I needed.
30
Copyright (C) 2003 Sun Microsystems, Inc.
31
Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
32
Python bindings by Joe Wreschnig <piman@sacredchao.net>
34
This library is free software; you can redistribute it and/or
35
modify it under the terms of the GNU Lesser General Public
36
License as published by the Free Software Foundation; either
37
version 2 of the License, or (at your option) any later version.