mirror of
https://github.com/gryf/wicd.git
synced 2025-12-23 14:42:29 +01:00
- Added missing function in IndicatorTrayIconGUI class
- Fixed wrong icon path
This commit is contained in:
@@ -979,8 +979,8 @@ TX:'''))
|
|||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
TrayIcon.TrayIconGUI.__init__(self, parent)
|
TrayIcon.TrayIconGUI.__init__(self, parent)
|
||||||
self.ind = appindicator.Indicator(
|
self.ind = appindicator.Indicator(
|
||||||
"wicd", "", appindicator.CATEGORY_SYSTEM_SERVICES)
|
"wicd", "wicd-gtk", appindicator.CATEGORY_SYSTEM_SERVICES, wpath.images)
|
||||||
self.ind.set_icon(wpath.images + "no-signal.png")
|
self.current_icon_name = ''
|
||||||
|
|
||||||
# Rescaning when hovering over the net_menu doesn't work.
|
# Rescaning when hovering over the net_menu doesn't work.
|
||||||
# (AFAICT, AppIndicator menus don't report PRELIGHT status.)
|
# (AFAICT, AppIndicator menus don't report PRELIGHT status.)
|
||||||
@@ -1018,6 +1018,12 @@ TX:'''))
|
|||||||
self.current_icon_path = path
|
self.current_icon_path = path
|
||||||
self.ind.set_icon(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):
|
def visible(self, val):
|
||||||
""" Set if the icon is visible or not.
|
""" Set if the icon is visible or not.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user