1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-20 04:48:00 +01:00

Fixed more signal display issues

Added a "Connecting..." dialog to tray icon in experimental branch
Possibly fixed issue where GUI statusbar would still show up as connected when ethernet cable was unplugged.
This commit is contained in:
imdano
2007-09-20 13:11:43 +00:00
parent 6f0faa1ac2
commit 2aa36c7329
5 changed files with 70 additions and 17 deletions

View File

@@ -526,9 +526,7 @@ class WirelessInterface(Interface):
"""
if network.get('key') != None:
iwpriv = misc.Run('iwpriv ' + self.iface + ' get_site_survey')
lines = iwpriv.splitlines()
lines = lines[2:]
lines = self._GetRalinkInfo()
for x in lines:
info = x.split()
if len(info) < 5:
@@ -589,6 +587,18 @@ class WirelessInterface(Interface):
return strength
def GetDBMStrength(self):
""" Get the dBm signal strength of the current network.
Returns:
The dBm signal strength.
"""
cmd = 'iwconfig ' + self.iface
if self.verbose: print cmd
output = misc.Run(cmd)
dbm_strength = misc.RunRegex(signaldbm_pattern,output)
return dbm_strength
def GetCurrentNetwork(self):
""" Get the essid of the current network.