def quitMainloopScreen(self, ret): retval = {"cancel factory reset": None, "do factory reset": 65, "do full factory reset": 64} if retval[ret[0]]: if "full" in ret[0]: from enigma import SR SR.getInstance().modeOff() from Screens.Standby import QuitMainloopScreen from enigma import quitMainloop self.quitScreen = self.session.instantiateDialog(QuitMainloopScreen, retvalue=retval[ret[0]]) self.quitScreen.show() quitMainloop(retval[ret[0]]) self.close()
def createSetup(self): self.list = [] string = _("LAN Setting On/Off") self.enableEntry = getConfigListEntry(string, self.mode_4dssetup) if self.enableEntry: if isinstance(self.enableEntry[1], ConfigOnOff): self.enableConfigEntry = self.enableEntry[1] self.list.append(self.enableEntry) self["statuspic"].hide() if self.enableConfigEntry: if os.path.exists("/etc/.4dsmode"): self.list.append(getConfigListEntry(_(" Connection"))) if SR.getInstance().checkInfo() == 0: self["statuspic"].setPixmapNum(0) else: self["statuspic"].setPixmapNum(1) self["statuspic"].show() self["list"] = List(self.list) self["config"].list = self.list self["config"].l.setList(self.list) self.SelectionChanged()
def createSetup(self): self.list = [ ] string = _("LAN Setting On/Off") self.enableEntry = getConfigListEntry(string, self.mode_4dssetup) if self.enableEntry: if isinstance(self.enableEntry[1], ConfigOnOff): self.enableConfigEntry = self.enableEntry[1] self.list.append(self.enableEntry) self["statuspic"].hide() if self.enableConfigEntry: if os.path.exists("/etc/.4dsmode"): self.list.append(getConfigListEntry(_(" Connection"))) if SR.getInstance().checkInfo() == 0: self["statuspic"].setPixmapNum(0) else: self["statuspic"].setPixmapNum(1) self["statuspic"].show() self["list"] = List(self.list) self["config"].list = self.list self["config"].l.setList(self.list) self.SelectionChanged()
def confirm(self, confirmed): if not confirmed: print "not confirmed" return else: if self.enableConfigEntry.value is True: SR.getInstance().modeOn() else: SR.getInstance().modeOff() self.keySave() self.close() from enigma import quitMainloop from Screens.Standby import QuitMainloopScreen self.quitScreen = self.session.instantiateDialog(QuitMainloopScreen, retvalue=2) self.quitScreen.show() quitMainloop(2)
def quitMainloopScreen(self, ret): retval = { "cancel factory reset": None, "do factory reset": 65, "do full factory reset": 64 } if retval[ret[0]]: if "full" in ret[0]: from enigma import SR SR.getInstance().modeOff() from Screens.Standby import QuitMainloopScreen from enigma import quitMainloop self.quitScreen = self.session.instantiateDialog( QuitMainloopScreen, retvalue=retval[ret[0]]) self.quitScreen.show() quitMainloop(retval[ret[0]]) self.close()
def confirm(self, confirmed): if not confirmed: print "not confirmed" return else: if self.enableConfigEntry.value is True: SR.getInstance().modeOn() else: SR.getInstance().modeOff() # self.keySave() self.close() from enigma import quitMainloop from Screens.Standby import QuitMainloopScreen self.quitScreen = self.session.instantiateDialog( QuitMainloopScreen, retvalue=2) self.quitScreen.show() quitMainloop(2)
def downloadKey(self): if SR.getInstance().downloadInfo() < 0: self.session.open(MessageBox, _("Failed to download."), MessageBox.TYPE_ERROR, timeout=7) else: self.session.open(MessageBox, _("Key downloaded."), MessageBox.TYPE_INFO, timeout=7)
def downloadKey(self): if SR.getInstance().downloadInfo() < 0: self.session.open(MessageBox, _("Failed to download."), MessageBox.TYPE_ERROR, timeout = 7) else: self.session.open(MessageBox, _("Key downloaded."), MessageBox.TYPE_INFO, timeout = 7)