mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 21:08:06 +01:00
fixed bug where wired icon wouldn't change if cable became unplugged, fixed yet another indentation screw up
This commit is contained in:
5
edgy.py
5
edgy.py
@@ -87,13 +87,16 @@ def set_signal_image():
|
|||||||
config.DisableLogging()
|
config.DisableLogging()
|
||||||
|
|
||||||
wired_ip = wired.GetWiredIP()
|
wired_ip = wired.GetWiredIP()
|
||||||
if wired.CheckPluggedIn() == True and wired_ip:
|
if wired.CheckPluggedIn() == True and wired_ip != None:
|
||||||
if stillWired == False: # Only set image/tooltip if it hasn't been set already
|
if stillWired == False: # Only set image/tooltip if it hasn't been set already
|
||||||
tr.set_from_file("images/wired.png")
|
tr.set_from_file("images/wired.png")
|
||||||
tr.set_tooltip(language['connected_to_wired'].replace('$A',wired_ip))
|
tr.set_tooltip(language['connected_to_wired'].replace('$A',wired_ip))
|
||||||
stillWired = True
|
stillWired = True
|
||||||
lock = ''
|
lock = ''
|
||||||
else:
|
else:
|
||||||
|
if stillWired == True:
|
||||||
|
tr.set_from_file("images/no-signal.png")
|
||||||
|
tr.set_tooltip(language['not_connected'])
|
||||||
stillWired = False
|
stillWired = False
|
||||||
wireless_ip = wireless.GetWirelessIP()
|
wireless_ip = wireless.GetWirelessIP()
|
||||||
#If ip returns as None, we are probably returning from hibernation and need to force signal to 0 to avoid crashing
|
#If ip returns as None, we are probably returning from hibernation and need to force signal to 0 to avoid crashing
|
||||||
|
|||||||
Reference in New Issue
Block a user