Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2009-02-01 14:15:16 (GMT)
committer Tomeu Vizoso <tomeu@sugarlabs.org>2009-02-01 14:15:16 (GMT)
commita4369d18d956e6bdff82082c82274754e76cfcea (patch)
tree7b2994cc84c93b1c03d3030fefa48c2557ee428c /extensions
parentd0a231e33b933086b91ddfc933e9385f58cc8841 (diff)
Correctly initialize the TrayIcon
Diffstat (limited to 'extensions')
-rw-r--r--extensions/deviceicon/volume.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/extensions/deviceicon/volume.py b/extensions/deviceicon/volume.py
index ca92647..6de5074 100644
--- a/extensions/deviceicon/volume.py
+++ b/extensions/deviceicon/volume.py
@@ -41,25 +41,27 @@ class DeviceView(TrayIcon):
FRAME_POSITION_RELATIVE = 500
def __init__(self, mount):
- TrayIcon.__init__(self)
+
self._mount = mount
+ icon_name = None
icon_theme = gtk.icon_theme_get_default()
for icon_name in self._mount.get_icon().props.names:
icon_info = icon_theme.lookup_icon(icon_name,
- style.STANDARD_ICON_SIZE, 0)
+ gtk.ICON_SIZE_LARGE_TOOLBAR, 0)
if icon_info is not None:
- self.get_icon().props.icon_name = icon_name
+ icon_name = icon_name
icon_info.free()
break
- if self.get_icon().props.icon_name is None:
- self.get_icon().props.icon_name = 'drive'
+ if icon_name is None:
+ icon_name = 'drive'
# TODO: retrieve the colors from the owner of the device
client = gconf.client_get_default()
color = XoColor(client.get_string('/desktop/sugar/user/color'))
- self.get_icon().props.xo_color = color
+
+ TrayIcon.__init__(self, icon_name=icon_name, xo_color=color)
self.connect('button-release-event', self.__button_release_event_cb)