self.oktext = _("Press OK on your remote control to continue.")
self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up")
- self.createConfig()
-
self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
{
"cancel": (self.keyCancel, _("exit network adapter configuration")),
self.list = []
ConfigListScreen.__init__(self, self.list,session = self.session)
- self.createSetup()
+ self.initConfig()
self.onLayoutFinish.append(self.layoutFinished)
self.onClose.append(self.cleanup)
self["HelpWindow"] = Pixmap()
self["HelpWindow"].hide()
- def layoutFinished(self):
+ def updateInterfaces(self,callback = None):
+ iNetwork.config_ready = False
+ iNetwork.msgPlugins()
+ iNetwork.getInterfaces(callback)
+
+ def updateInterfaceCB(self, ret=None):
+ self.createConfig()
+ self.createSetup()
self["DNS1"].setText(self.primaryDNS.getText())
self["DNS2"].setText(self.secondaryDNS.getText())
if self.ipConfigEntry.getText() is not None:
self["Gatewaytext"].setText("")
self["Adapter"].setText(iNetwork.getFriendlyAdapterName(self.iface))
- def createConfig(self):
+ def layoutFinished(self):
+ self.updateInterfaces(self.updateInterfaceCB)
+
+ def initConfig(self):
self.InterfaceEntry = None
self.dhcpEntry = None
self.gatewayEntry = None
self.wsconfig = None
self.default = None
+ def createConfig(self):
if iNetwork.isWirelessInterface(self.iface):
from Plugins.SystemPlugins.WirelessLan.Wlan import wpaSupplicant
self.ws = wpaSupplicant()
self.encryptionlist.append(("Unencrypted", _("Unencrypted")))
self.encryptionlist.append(("WEP", _("WEP")))
self.encryptionlist.append(("WPA", _("WPA")))
- self.encryptionlist.append(("WPA/WPA2", _("WPA or WPA2")))
+ if not iNetwork.useWlCommand(self.iface):
+ self.encryptionlist.append(("WPA/WPA2", _("WPA or WPA2")))
self.encryptionlist.append(("WPA2", _("WPA2")))
self.weplist = []
self.weplist.append("ASCII")
def hideInputHelp(self):
current = self["config"].getCurrent()
- if current == self.wlanSSID:
+ if self.wlanSSID is not None and current == self.wlanSSID:
if current[1].help_window.instance is not None:
current[1].help_window.instance.hide()
- elif current == self.encryptionKey and config.plugins.wlan.encryption.value is not "Unencrypted":
+ elif self.encryptionKey is not None and current == self.encryptionKey and config.plugins.wlan.encryption.value is not "Unencrypted":
if current[1].help_window.instance is not None:
current[1].help_window.instance.hide()