diff options
author | Paul W. Frields <stickster@gmail.com> | 2010-12-19 20:10:47 -0500 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2010-12-19 20:10:47 -0500 |
commit | cb7a955ad785e57d8ad6c8ae106f12c3e6f22d19 (patch) | |
tree | 02d4197c4488135b59e92a9337ff528051e52b69 | |
parent | e2df28470fdc3f6d37a76dba1115a40ee97f2b1b (diff) | |
download | pulsecaster-cb7a955ad785e57d8ad6c8ae106f12c3e6f22d19.tar.gz pulsecaster-cb7a955ad785e57d8ad6c8ae106f12c3e6f22d19.tar.xz pulsecaster-cb7a955ad785e57d8ad6c8ae106f12c3e6f22d19.zip |
Add eggtrayicon placeholder
-rw-r--r-- | pulsecaster/eggtrayicon.py | 31 | ||||
-rw-r--r-- | pulsecaster/ui.py | 3 |
2 files changed, 34 insertions, 0 deletions
diff --git a/pulsecaster/eggtrayicon.py b/pulsecaster/eggtrayicon.py new file mode 100644 index 0000000..8ee3b97 --- /dev/null +++ b/pulsecaster/eggtrayicon.py @@ -0,0 +1,31 @@ +# Copyright (C) 2010 Paul W. Frields and others. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# +# Author: Paul W. Frields <stickster@gmail.com> + +from config import NAME +import pygtk +pygtk.require("2.0") +import gtk +import egg.trayicon + +class PulseCasterTrayIcon: + def __init__(self): + self = egg.trayicon.TrayIcon(NAME) + self.add(gtk.image_new_from_icon_name('pulsecaster', gtk.ICON_SIZE_LARGE_TOOLBAR)) + +# Later on the trayicon will have useful features, e.g. a tooltip +# showing the elapsed time. diff --git a/pulsecaster/ui.py b/pulsecaster/ui.py index 837156e..f7ff556 100644 --- a/pulsecaster/ui.py +++ b/pulsecaster/ui.py @@ -23,6 +23,7 @@ from config import * import gconfig from pulseaudio.PulseObj import PulseObj from listener import * +from eggtrayicon import * import gtk import os import sys @@ -132,6 +133,8 @@ class PulseCasterUI: self.filesinkpath = '' + self.trayicon = PulseCasterTrayIcon() + def repop_sources(self, *args): self.sources = self.pa.pulse_source_list() l = self.user_vox.get_model() |