aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2010-04-09 08:25:08 +0200
committerFraxinas <andreas.frisch@multimedia-labs.de>2010-04-09 08:25:08 +0200
commit98c7a787df63a93f868548c2b1e357c0d873ebbe (patch)
treee8258f3e175e540e6106e0b7202abcf550b825d1 /lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
parentae60e9e3642949a91b7ea4f77374495fec9a51ed (diff)
parent76250cdc36d0f0e84505d5654066229b846f035f (diff)
downloadenigma2-98c7a787df63a93f868548c2b1e357c0d873ebbe.tar.gz
enigma2-98c7a787df63a93f868548c2b1e357c0d873ebbe.zip
Merge branch 'experimental' of git.opendreambox.org:/git/enigma2 into experimental
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py')
-rwxr-xr-xlib/python/Plugins/SystemPlugins/WirelessLan/plugin.py27
1 files changed, 12 insertions, 15 deletions
diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py b/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
index a9f7bf43..2df5814c 100755
--- a/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
@@ -190,7 +190,7 @@ class WlanScan(Screen):
self.newAPList = None
self.WlanList = None
self.cleanList = None
- self.oldlist = None
+ self.oldlist = {}
self.listLength = None
self.rescanTimer = eTimer()
self.rescanTimer.callback.append(self.rescanTimerFired)
@@ -274,24 +274,18 @@ class WlanScan(Screen):
return((essid, bssid, _("Signal: ") + str(signal), _("Max. Bitrate: ") + str(maxrate), _("Encrypted: ") + encryption, _("Interface: ") + str(iface), divpng))
def updateAPList(self):
- self.oldlist = []
- self.oldlist = self.cleanList
- self.newAPList = []
newList = []
+ newList = self.getAccessPoints(refresh = True)
+ self.newAPList = []
tmpList = []
newListIndex = None
currentListEntry = None
currentListIndex = None
- newList = self.getAccessPoints(refresh = True)
-
- for oldentry in self.oldlist:
- if oldentry not in newList:
- newList.append(oldentry)
- for newentry in newList:
- if newentry[1] == "hidden...":
- continue
- tmpList.append(newentry)
+ for ap in self.oldlist.keys():
+ data = self.oldlist[ap]['data']
+ if data is not None:
+ tmpList.append(data)
if len(tmpList):
if "hidden..." not in tmpList:
@@ -303,7 +297,7 @@ class WlanScan(Screen):
currentListEntry = self["list"].getCurrent()
idx = 0
for entry in self.newAPList:
- if entry == currentListEntry:
+ if entry[0] == currentListEntry[0]:
newListIndex = idx
idx +=1
self['list'].setList(self.newAPList)
@@ -335,6 +329,10 @@ class WlanScan(Screen):
compList.remove(compentry)
for entry in compList:
self.cleanList.append( ( entry[0], entry[1], entry[2], entry[3], entry[4], entry[5] ) )
+ if not self.oldlist.has_key(entry[0]):
+ self.oldlist[entry[0]] = { 'data': entry }
+ else:
+ self.oldlist[entry[0]]['data'] = entry
if "hidden..." not in self.cleanList:
self.cleanList.append( ( _("enter hidden network SSID"), "hidden...", True, self.iface, _("unavailable"), "" ) )
@@ -401,4 +399,3 @@ def configStrings(iface):
def Plugins(**kwargs):
return PluginDescriptor(name=_("Wireless LAN"), description=_("Connect to a Wireless Network"), where = PluginDescriptor.WHERE_NETWORKSETUP, fnc={"ifaceSupported": callFunction, "configStrings": configStrings, "WlanPluginEntry": lambda x: "Wireless Network Configuartion..."})
- \ No newline at end of file