1 diff --git a/lib/python/Screens/NetworkSetup.py b/lib/python/Screens/NetworkSetup.py
2 index 2ea9b50..d24170d 100755
3 --- a/lib/python/Screens/NetworkSetup.py
4 +++ b/lib/python/Screens/NetworkSetup.py
5 @@ -23,6 +23,21 @@ from enigma import eTimer, ePoint, eSize, RT_HALIGN_LEFT, eListboxPythonMultiCon
6 from os import path as os_path, system as os_system, unlink
7 from re import compile as re_compile, search as re_search
9 +def stopWlanConsole():
11 + from Plugins.SystemPlugins.WirelessLanSetup.Wlan import iStatus
15 + iStatus.stopWlanConsole()
17 +def getDataForWlanIface(iface, callback):
19 + from Plugins.SystemPlugins.WirelessLanSetup.Wlan import iStatus
20 + iStatus.getDataForInterface(iface, callback)
25 class NetworkAdapterSelection(Screen,HelpableScreen):
26 def __init__(self, session):
27 @@ -413,7 +428,7 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen):
30 if iNetwork.isWirelessInterface(self.iface):
31 - from Plugins.SystemPlugins.WirelessLan.Wlan import wpaSupplicant
32 + from Plugins.SystemPlugins.WirelessLanSetup.Wlan import wpaSupplicant
33 self.ws = wpaSupplicant()
34 self.encryptionlist = []
35 self.encryptionlist.append(("Unencrypted", _("Unencrypted")))
36 @@ -766,7 +781,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen):
37 if self["menulist"].getCurrent()[1] == 'edit':
38 if iNetwork.isWirelessInterface(self.iface):
40 - from Plugins.SystemPlugins.WirelessLan.plugin import WlanScan
41 + from Plugins.SystemPlugins.WirelessLanSetup.plugin import WlanScan
43 self.session.open(MessageBox, self.missingwlanplugintxt, type = MessageBox.TYPE_INFO,timeout = 10 )
45 @@ -782,7 +797,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen):
46 self.session.open(NameserverSetup)
47 if self["menulist"].getCurrent()[1] == 'scanwlan':
49 - from Plugins.SystemPlugins.WirelessLan.plugin import WlanScan
50 + from Plugins.SystemPlugins.WirelessLanSetup.plugin import WlanScan
52 self.session.open(MessageBox, self.missingwlanplugintxt, type = MessageBox.TYPE_INFO,timeout = 10 )
54 @@ -792,7 +807,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen):
55 self.showErrorMessage() # Display Wlan not available Message
56 if self["menulist"].getCurrent()[1] == 'wlanstatus':
58 - from Plugins.SystemPlugins.WirelessLan.plugin import WlanStatus
59 + from Plugins.SystemPlugins.WirelessLanSetup.plugin import WlanStatus
61 self.session.open(MessageBox, self.missingwlanplugintxt, type = MessageBox.TYPE_INFO,timeout = 10 )
63 @@ -856,13 +871,9 @@ class AdapterSetupConfiguration(Screen, HelpableScreen):
64 self["Statustext"].setText(_("Link:"))
66 if iNetwork.isWirelessInterface(self.iface):
68 - from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus
70 + if not getDataForWlanIface(self.iface, self.getInfoCB):
71 self["statuspic"].setPixmapNum(1)
72 self["statuspic"].show()
74 - iStatus.getDataForInterface(self.iface,self.getInfoCB)
76 iNetwork.getLinkState(self.iface,self.dataAvail)
78 @@ -907,7 +918,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen):
79 if ret is not None and len(ret):
80 if ret[0] == 'ok' and (iNetwork.isWirelessInterface(self.iface) and iNetwork.getAdapterAttribute(self.iface, "up") is True):
82 - from Plugins.SystemPlugins.WirelessLan.plugin import WlanStatus
83 + from Plugins.SystemPlugins.WirelessLanSetup.plugin import WlanStatus
85 self.session.open(MessageBox, self.missingwlanplugintxt, type = MessageBox.TYPE_INFO,timeout = 10 )
87 @@ -922,16 +933,14 @@ class AdapterSetupConfiguration(Screen, HelpableScreen):
89 def WlanStatusClosed(self, *ret):
90 if ret is not None and len(ret):
91 - from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus
92 - iStatus.stopWlanConsole()
94 self.updateStatusbar()
96 def WlanScanClosed(self,*ret):
97 if ret[0] is not None:
98 self.session.openWithCallback(self.AdapterSetupClosed, AdapterSetup, self.iface,ret[0])
100 - from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus
101 - iStatus.stopWlanConsole()
103 self.updateStatusbar()
105 def restartLan(self, ret = False):
106 @@ -975,12 +984,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen):
107 iNetwork.stopDeactivateInterfaceConsole()
108 iNetwork.stopActivateInterfaceConsole()
109 iNetwork.stopPingConsole()
111 - from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus
112 - except ImportError:
115 - iStatus.stopWlanConsole()
118 def getInfoCB(self,data,status):
119 self.LinkState = None
120 @@ -1343,15 +1347,11 @@ class NetworkAdapterTest(Screen):
122 def getLinkState(self,iface):
123 if iface in iNetwork.wlan_interfaces:
125 - from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus
127 - self["Network"].setForegroundColorNum(1)
128 - self["Network"].setText(_("disconnected"))
129 - self["NetworkInfo_Check"].setPixmapNum(1)
130 - self["NetworkInfo_Check"].show()
132 - iStatus.getDataForInterface(self.iface,self.getInfoCB)
133 + if not getDataForWlanIface(self.iface, self.getInfoCB):
134 + self["Network"].setForegroundColorNum(1)
135 + self["Network"].setText(_("disconnected"))
136 + self["NetworkInfo_Check"].setPixmapNum(1)
137 + self["NetworkInfo_Check"].show()
139 iNetwork.getLinkState(iface,self.LinkStatedataAvail)
141 @@ -1425,10 +1425,5 @@ class NetworkAdapterTest(Screen):
143 iNetwork.stopLinkStateConsole()
144 iNetwork.stopDNSConsole()
146 - from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus
147 - except ImportError:
150 - iStatus.stopWlanConsole()