1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-24 23:22:27 +01:00

IndicatorTrayIconGUI was missing the function "set_from_name" and also the icon path was wrong.

Thanks, Bastian Köcher!
This commit is contained in:
Tom Van Braeckel
2015-04-24 16:55:14 +02:00

View File

@@ -979,8 +979,8 @@ TX:'''))
def __init__(self, parent):
TrayIcon.TrayIconGUI.__init__(self, parent)
self.ind = appindicator.Indicator(
"wicd", "", appindicator.CATEGORY_SYSTEM_SERVICES)
self.ind.set_icon(wpath.images + "no-signal.png")
"wicd", "wicd-gtk", appindicator.CATEGORY_SYSTEM_SERVICES, wpath.images)
self.current_icon_name = ''
# Rescaning when hovering over the net_menu doesn't work.
# (AFAICT, AppIndicator menus don't report PRELIGHT status.)
@@ -1017,6 +1017,12 @@ TX:'''))
if path != self.current_icon_path:
self.current_icon_path = path
self.ind.set_icon(path)
def set_from_name(self, name=None):
""" Sets a new tray icon picture. """
if name != self.current_icon_name:
self.current_icon_name = name
self.ind.set_icon(name)
def visible(self, val):
""" Set if the icon is visible or not.