diff options
author | Paul W. Frields <stickster@gmail.com> | 2010-12-20 22:15:16 -0500 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2010-12-20 22:15:16 -0500 |
commit | 8e93d38bf8d965047cb683dfcbfd9ec021ff44e2 (patch) | |
tree | 2226c64b623092cb5eeac2b8384e85a45b514267 | |
parent | a7b2271a969a06d639fb0ac27d4a22b797ba4946 (diff) | |
download | pulsecaster-8e93d38bf8d965047cb683dfcbfd9ec021ff44e2.tar.gz pulsecaster-8e93d38bf8d965047cb683dfcbfd9ec021ff44e2.tar.xz pulsecaster-8e93d38bf8d965047cb683dfcbfd9ec021ff44e2.zip |
Replace use of egg.trayicon with gtk.StatusIcon
-rw-r--r-- | pulsecaster/eggtrayicon.py | 31 | ||||
-rw-r--r-- | pulsecaster/ui.py | 4 |
2 files changed, 3 insertions, 32 deletions
diff --git a/pulsecaster/eggtrayicon.py b/pulsecaster/eggtrayicon.py deleted file mode 100644 index 8ee3b97..0000000 --- a/pulsecaster/eggtrayicon.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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 ce089e1..0707f27 100644 --- a/pulsecaster/ui.py +++ b/pulsecaster/ui.py @@ -136,7 +136,9 @@ class PulseCasterUI: self.filesinkpath = '' - self.trayicon = PulseCasterTrayIcon() + self.trayicon = gtk.StatusIcon() + self.trayicon.set_visible(False) + self.trayicon.set_from_icon_name('pulsecaster') def repop_sources(self, *args): self.sources = self.pa.pulse_source_list() |