def __init__(self, session, iface): Screen.__init__(self, session) self.session = session self.iface = iface self.skin_path = plugin_path self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up") self.APList = None self.newAPList = None self.WlanList = None self.cleanList = None self.oldlist = {} self.listLength = None self.rescanTimer = eTimer() self.rescanTimer.callback.append(self.rescanTimerFired) self["info"] = StaticText() self.list = [] self["list"] = List(self.list) self["key_red"] = StaticText(_("Close")) self["key_green"] = StaticText(_("Connect")) self["key_yellow"] = StaticText() self["actions"] = NumberActionMap( ["WizardActions", "InputActions", "EPGSelectActions"], {"ok": self.select, "back": self.cancel}, -1 ) self["shortcuts"] = ActionMap(["ShortcutActions"], {"red": self.cancel, "green": self.select}) iWlan.setInterface(self.iface) self.w = iWlan.getInterface() self.onLayoutFinish.append(self.layoutFinished) self.getAccessPoints(refresh=False)
def startup(self): iWlan.setInterface(self.iface) if self.oldInterfaceState is not True: self["Status"].setText(("Please wait for activating interface...")) self.activateIfaceTimer.start(10, True) else: self.updateStatusTimer.start(10, True)
def callFunction(iface): iWlan.setInterface(iface) i = iWlan.getWirelessInterfaces() if i: if iface in i or iNetwork.isWirelessInterface(iface): return WlanStatusScreenMain return None return None
def __init__(self, session, iface): Screen.__init__(self, session) self.session = session self.iface = iface self.skin_path = plugin_path self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up") self.APList = None self.newAPList = None self.WlanList = None self.cleanList = None self.oldlist = {} self.listLength = None self.divpng = LoadPixmap( path=resolveFilename(SCOPE_ACTIVE_SKIN, "div-h.png")) self.rescanTimer = eTimer() self.rescanTimer.callback.append(self.rescanTimerFired) self["info"] = StaticText() self.list = [] self["list"] = List(self.list) self["key_red"] = StaticText(_("Close")) self["key_green"] = StaticText(_("Connect")) self["key_yellow"] = StaticText() self["actions"] = NumberActionMap( ["WizardActions", "InputActions", "EPGSelectActions"], { "ok": self.select, "back": self.cancel, }, -1) self["shortcuts"] = ActionMap(["ShortcutActions"], { "red": self.cancel, "green": self.select, }) iWlan.setInterface(self.iface) self.w = iWlan.getInterface() self.onLayoutFinish.append(self.layoutFinished) self.getAccessPoints(refresh=False)
def __onClose(self): iWlan.deActivateIface() iWlan.setInterface()