mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
Fixed typo in the testing release, added ralink correct signal strength info to experimental release, fixed wired connection bug in experimental release
This commit is contained in:
@@ -737,6 +737,7 @@ class ConnectionWizard(dbus.service.Object):
|
|||||||
print "profileList = ",profileList
|
print "profileList = ",profileList
|
||||||
for profile in profileList:
|
for profile in profileList:
|
||||||
print "profile = ", profile
|
print "profile = ", profile
|
||||||
|
if config.has_option(profile,"default"):
|
||||||
if config.get(profile,"default") == "True":
|
if config.get(profile,"default") == "True":
|
||||||
print "removing existing default"
|
print "removing existing default"
|
||||||
config.set(profile,"default", False)
|
config.set(profile,"default", False)
|
||||||
@@ -749,6 +750,7 @@ class ConnectionWizard(dbus.service.Object):
|
|||||||
config.read(self.wired_conf)
|
config.read(self.wired_conf)
|
||||||
profileList = config.sections()
|
profileList = config.sections()
|
||||||
for profile in profileList:
|
for profile in profileList:
|
||||||
|
if config.has_option(profile,"default"):
|
||||||
if config.get(profile,"default") == "True":
|
if config.get(profile,"default") == "True":
|
||||||
return profile
|
return profile
|
||||||
return None
|
return None
|
||||||
|
|||||||
18
gui.py
18
gui.py
@@ -330,6 +330,16 @@ class PrettyWirelessNetworkEntry(PrettyNetworkEntry):
|
|||||||
|
|
||||||
def setSignalStrength(self,strength):
|
def setSignalStrength(self,strength):
|
||||||
strength = int(strength)
|
strength = int(strength)
|
||||||
|
if daemon.GetWPADriver() == 'ralink legacy':
|
||||||
|
if strength <= 60:
|
||||||
|
self.image.set_from_file("images/signal-100.png")
|
||||||
|
elif strength <= 70:
|
||||||
|
self.image.set_from_file("images/signal-75.png")
|
||||||
|
elif strength <= 80:
|
||||||
|
self.image.set_from_file("images/signal-50.png")
|
||||||
|
else:
|
||||||
|
self.image.set_from_file("images/signal-25.png")
|
||||||
|
else:
|
||||||
if strength > 75:
|
if strength > 75:
|
||||||
self.image.set_from_file("images/signal-100.png")
|
self.image.set_from_file("images/signal-100.png")
|
||||||
elif strength > 50:
|
elif strength > 50:
|
||||||
@@ -744,7 +754,13 @@ class WirelessNetworkEntry(NetworkEntry):
|
|||||||
self.vboxEncryptionInformation.show_all()
|
self.vboxEncryptionInformation.show_all()
|
||||||
|
|
||||||
def setSignalStrength(self,strength):
|
def setSignalStrength(self,strength):
|
||||||
self.lblStrength.set_label(str(strength) + "%")
|
if daemon.GetWPADriver() == 'ralink legacy':
|
||||||
|
ending = "dBm"
|
||||||
|
start = "-"
|
||||||
|
else:
|
||||||
|
ending = "%"
|
||||||
|
start = ""
|
||||||
|
self.lblStrength.set_label(start + str(strength) + ending)
|
||||||
|
|
||||||
def setMACAddress(self,address):
|
def setMACAddress(self,address):
|
||||||
self.lblMAC.set_label(str(address))
|
self.lblMAC.set_label(str(address))
|
||||||
|
|||||||
Reference in New Issue
Block a user