~ubuntu-branches/ubuntu/karmic/quodlibet/karmic

« back to all changes in this revision

Viewing changes to trayicon/README

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2009-01-30 23:55:34 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20090130235534-l4e72ulw0vqfo17w
Tags: 2.0-1ubuntu1
* Merge from Debian experimental (LP: #276856), remaining Ubuntu changes:
  + debian/patches/40-use-music-profile.patch:
    - Use the "Music and Movies" pipeline per default.
* Refresh the above patch for new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
6
 
 
7
 
This code was ripped from libegg CVS, and so when it breaks you get
8
 
both pieces.
9
 
 
10
 
Compiling:
11
 
----------
12
 
(Requires the PyGTK and Python development libraries.)
13
 
$ make statusicon.so
14
 
 
15
 
Usage:
16
 
------
17
 
import statusicon
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")
22
 
 
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.
27
 
 
28
 
License:
29
 
--------
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>
33
 
 
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.