def __init__(self, session, timer): Screen.__init__(self, session) self.timer = timer print 'TimerSanityConflict' self['timer1'] = TimerList(self.getTimerList(timer[0])) self.list = [] self.list2 = [] count = 0 for x in timer: if count != 0: self.list.append((_('Conflicting timer') + ' ' + str(count), x)) self.list2.append((timer[count], False)) count += 1 if count == 1: self.list.append(_('Channel not in services list')) self['list'] = MenuList(self.list) self['timer2'] = TimerList(self.list2) self['key_red'] = Button(_('Edit new entry')) self['key_green'] = Button(' ') self['key_yellow'] = Button(' ') self['key_blue'] = Button(' ') self.key_green_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self['actions'] = ActionMap(['OkCancelActions', 'DirectionActions', 'ShortcutActions', 'TimerEditActions'], {'ok': self.leave_ok, 'cancel': self.leave_cancel, 'red': self.editTimer1, 'up': self.up, 'down': self.down}, -1) self.setTitle(_('Timer sanity error')) self.onShown.append(self.updateState)
def __init__(self, session, timer, menu_path=""): Screen.__init__(self, session) screentitle = _("Timer sanity error") self.menu_path = menu_path if config.usage.show_menupath.value == 'large': self.menu_path += screentitle title = self.menu_path self["menu_path_compressed"] = StaticText("") self.menu_path += ' / ' elif config.usage.show_menupath.value == 'small': title = screentitle condtext = "" if self.menu_path and not self.menu_path.endswith(' / '): condtext = self.menu_path + " >" elif self.menu_path: condtext = self.menu_path[:-3] + " >" self["menu_path_compressed"] = StaticText(condtext) self.menu_path += screentitle + ' / ' else: title = screentitle self["menu_path_compressed"] = StaticText("") Screen.setTitle(self, title) self.timer = timer print "[TimerEdit] TimerSanityConflict" self["timer1"] = TimerList(self.getTimerList(timer[0])) self.list = [] self.list2 = [] count = 0 for x in timer: if count != 0: self.list.append((_("Conflicting timer") + " " + str(count), x)) self.list2.append((timer[count], False)) count += 1 if count == 1: self.list.append((_("Channel not in services list"))) self["list"] = MenuList(self.list) self["timer2"] = TimerList(self.list2) self["key_red"] = StaticText(_("Edit new entry")) # self["key_green"] = StaticText("") self["key_yellow"] = StaticText("") self["key_blue"] = StaticText("") self.key_green_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions"], { "ok": self.leave_ok, "cancel": self.leave_cancel, "red": self.editTimer1, "up": self.up, "down": self.down }, -1) self.onShown.append(self.updateState)
def __init__(self, session, autotimer): Screen.__init__(self, session) self.skinName = "TimerEditList" self.autotimer = autotimer self.list = [] self.fillTimerList() self["timerlist"] = TimerList(self.list) self["description"] = StaticText() self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("OK")) self["key_yellow"] = Button("") self["key_blue"] = Button("") self["actions"] = ActionMap( ["OkCancelActions", "ColorActions"], { "ok": self.openImporter, "cancel": self.cancel, "green": self.openImporter, "red": self.cancel }, -1) self.onLayoutFinish.append(self.setCustomTitle)
def __init__(self, session, menu_path=""): Screen.__init__(self, session) screentitle = _("Timer List") self.menu_path = menu_path ProtectedScreen.__init__(self) if config.usage.show_menupath.value == 'large': self.menu_path += screentitle title = self.menu_path self["menu_path_compressed"] = StaticText("") self.menu_path += ' / ' elif config.usage.show_menupath.value == 'small': title = screentitle condtext = "" if self.menu_path and not self.menu_path.endswith(' / '): condtext = self.menu_path + " >" elif self.menu_path: condtext = self.menu_path[:-3] + " >" self["menu_path_compressed"] = StaticText(condtext) self.menu_path += screentitle + ' / ' else: title = screentitle self["menu_path_compressed"] = StaticText("") Screen.setTitle(self, title) self.onChangedEntry = [] list = [] self.list = list self.fillTimerList() self["timerlist"] = TimerList(list) self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self["key_red"] = StaticText("") self["key_green"] = StaticText(_("Add")) self["key_yellow"] = StaticText("") self["key_blue"] = StaticText("") self["description"] = Label() self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.openEdit, "cancel": self.leave, "green": self.addCurrentTimer, "log": self.showLog, "left": self.left, "right": self.right, "up": self.up, "down": self.down, "moveTop": self.moveTop, "moveEnd": self.moveEnd }, -1) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onShown.append(self.updateState)
def __init__(self, session, timer): Screen.__init__(self, session) self.skinName = "TimerEditList" self.timer = timer self.list = [] count = 0 for x in timer: self.list.append((timer[count], False)) count += 1 warning_color = "\c00ffff00" # yellow title_text = count == 1 and warning_color + _("Channel not in services list") or warning_color + _("Timer sanity error") self.setTitle(title_text) self["timerlist"] = TimerList(self.list) self["key_red"] = Button(_("Cancel")) self["key_green"] = Button("") self["key_yellow"] = Button("") self["key_blue"] = Button("") self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions", "MenuActions"], { "cancel": self.leave_cancel, "red": self.leave_cancel, "green": self.editTimer, "ok": self.editTimer, "yellow": self.toggleTimer, "blue": self.ignoreConflict, "up": self.up, "down": self.down, "log": self.showLog, "menu": self.openExtendedSetup }, -1) self.onShown.append(self.updateState)
def __init__(self, session): Screen.__init__(self, session) self.list = [] self._timerlist = TimerList(self.list) self["timerlist"] = self._timerlist self.fillTimerList() self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self["key_red"] = Button(" ") self["key_green"] = Button(_("Add")) self["key_yellow"] = Button(" ") self["key_blue"] = Button(" ") print("key_red_choice:", self.key_red_choice) self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.openEdit, "cancel": self.leave, "green": self.addCurrentTimer, "log": self.showLog, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onShown.append(self.updateState)
def __init__(self, session): Screen.__init__(self, session) Screen.setTitle(self, _('Timer List')) self.onChangedEntry = [] list = [] self.list = list self.fillTimerList() self['timerlist'] = TimerList(list) self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self['key_red'] = Button(' ') self['key_green'] = Button(_('Add')) self['key_yellow'] = Button(' ') self['key_blue'] = Button(' ') self['description'] = Label() self['actions'] = ActionMap(['OkCancelActions', 'DirectionActions', 'ShortcutActions', 'TimerEditActions'], {'ok': self.openEdit, 'cancel': self.leave, 'green': self.addCurrentTimer, 'log': self.showLog, 'left': self.left, 'right': self.right, 'up': self.up, 'down': self.down}, -1) self.setTitle(_('Timer overview')) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onShown.append(self.updateState)
def __init__(self, session): Screen.__init__(self, session) list = [] self.list = list self.url = None self["timerlist"] = TimerList(list) self["Service"] = ServiceEvent() self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY if self.key_red_choice == StaticText: self["key_red"] = StaticText("") self["key_green"] = StaticText(_("Add")) self["key_yellow"] = StaticText("") self["key_blue"] = StaticText("") self["key_info"] = StaticText("") else: self["key_red"] = Button("") self["key_green"] = Button(_("Add")) self["key_yellow"] = Button("") self["key_blue"] = Button("") self["key_info"] = Button("") self["description"] = Label("") self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.openEdit, "cancel": self.leave, "green": self.addCurrentTimer, "log": self.showLog, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.setTitle(_("Timer overview")) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onShown.append(self.updateState) if self.isProtected() and config.ParentalControl.servicepin[0].value: self.onFirstExecBegin.append( boundFunction( self.session.openWithCallback, self.pinEntered, PinInput, pinList=[ x.value for x in config.ParentalControl.servicepin ], triesEntry=config.ParentalControl.retries.servicepin, title=_("Please enter the correct pin code"), windowTitle=_("Enter pin code"))) self.fallbackTimer = FallbackTimerList(self, self.fillTimerList)
def __init__(self, session, list): Screen.__init__(self, session) self.setTitle(_('Timer selection')) self.list = list self['timerlist'] = TimerList(self.list) self['actions'] = ActionMap(['OkCancelActions'], {'ok': self.selected, 'cancel': self.leave }, -1)
def __init__(self, session, timer): Screen.__init__(self, session) self.setTitle(_("Timer Sanity Error")) self.timer = timer print "[TimerEdit] TimerSanityConflict" self["timer1"] = TimerList(self.getTimerList(timer[0])) self.list = [] self.list2 = [] count = 0 for x in timer: if count != 0: self.list.append( (_("Conflicting timer") + " " + str(count), x)) self.list2.append((timer[count], False)) count += 1 if count == 1: self.list.append((_("Channel not in services list"))) self["list"] = MenuList(self.list) self["timer2"] = TimerList(self.list2) self["key_red"] = StaticText(_("Edit new entry")) # self["key_green"] = StaticText("") self["key_yellow"] = StaticText("") self["key_blue"] = StaticText("") self.key_green_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.leave_ok, "cancel": self.leave_cancel, "red": self.editTimer1, "up": self.up, "down": self.down }, -1) self.onShown.append(self.updateState)
def __init__(self, session, timer): Screen.__init__(self, session) TimerListButtons.__init__(self) self.timer = timer print "TimerSanityConflict" self["lab1"] = StaticText(_("New timer")) self["lab2"] = StaticText(_("Conflicting timers")) self["timer1"] = TimerList(self.getTimerList(timer[0])) self.list2 = [] count = 0 for x in timer: if count != 0: self.list2.append((timer[count], False)) count += 1 if count == 1: self.list.append((_("Channel not in services list"))) self["timer2"] = TimerList(self.list2) self.buttonActions = ( (None, ""), # EMPTY = 0 (self.editTimer1, _("Edit")), # EDIT1 = 1 (self.editTimer2, _("Edit")), # EDIT2 = 2 (self.toggleTimer, _("Enable")), # ENABLE = 3 (self.toggleTimer, _("Disable")), # DISABLE = 4 (self.toggleTimer, _("Stop & Disable")), # STOPDISABLE = 5 ) self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.leave_ok, "cancel": self.leave_cancel, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.setTitle(_("Timer sanity error")) self.onShown.append(self.updateState)
def __init__(self, session, menu_path = ""): Screen.__init__(self, session) screentitle = _("Timer List") self.menu_path = menu_path if config.usage.show_menupath.value == 'large': self.menu_path += screentitle title = self.menu_path self["menu_path_compressed"] = StaticText("") self.menu_path += ' / ' elif config.usage.show_menupath.value == 'small': title = screentitle condtext = "" if self.menu_path and not self.menu_path.endswith(' / '): condtext = self.menu_path + " >" elif self.menu_path: condtext = self.menu_path[:-3] + " >" self["menu_path_compressed"] = StaticText(condtext) self.menu_path += screentitle + ' / ' else: title = screentitle self["menu_path_compressed"] = StaticText("") Screen.setTitle(self, title) self.onChangedEntry = [ ] list = [ ] self.list = list self.fillTimerList() self["timerlist"] = TimerList(list) self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self["key_red"] = StaticText("") self["key_green"] = StaticText(_("Add")) self["key_yellow"] = StaticText("") self["key_blue"] = StaticText("") self["description"] = Label() self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions"], { "ok": self.openEdit, "cancel": self.leave, "green": self.addCurrentTimer, "log": self.showLog, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onShown.append(self.updateState) if self.isProtected() and config.ParentalControl.servicepin[0].value: self.onFirstExecBegin.append(boundFunction(self.session.openWithCallback, self.pinEntered, PinInput, pinList=[x.value for x in config.ParentalControl.servicepin], triesEntry=config.ParentalControl.retries.servicepin, title=_("Please enter the correct pin code"), windowTitle=_("Enter pin code")))
def __init__(self, list, videoMode, piconLoader, piconSize, listStyle): self.videoMode = videoMode self.piconLoader = piconLoader self.piconSize = piconSize self.baseHeight = self.piconSize.height() self.listStyle = listStyle TimerList.__init__(self, list) self.l = eListboxPythonMultiContent() self.l.setBuildFunc(self.buildTimerEntry) self.onSelectionChanged = [ ] if self.videoMode == MODE_SD or self.videoMode == MODE_XD: self.overallFontHeight = 36 elif self.videoMode == MODE_HD: self.overallFontHeight = 44 self.l.setList(list) config.plugins.merlinEpgCenter.listItemHeight.addNotifier(self.changeHeight, initial_call = True)
def __init__(self, session, list): Screen.__init__(self, session) self.list = list self["timerlist"] = TimerList(self.list) self["actions"] = ActionMap(["OkCancelActions"], { "ok": self.selected, "cancel": self.leave, }, -1)
def __init__(self, session): Screen.__init__(self, session) list = [] self.list = list self.fillTimerList() self["timerlist"] = TimerList(list) self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self["key_red"] = Button(" ") self["key_green"] = Button(_("Add")) self["key_yellow"] = Button(" ") self["key_blue"] = Button(" ") print "[TimerEditList] key_red_choice:", self.key_red_choice self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.openEdit, "cancel": self.leave, "green": self.addCurrentTimer, "log": self.showLog, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.setTitle(_("Timer overview")) # Disable for test because it crashes on some boxes with SSD ############# #self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) ########################################################################## self.onShown.append(self.updateState) if self.isProtected() and config.ParentalControl.servicepin[0].value: self.onFirstExecBegin.append( boundFunction( self.session.openWithCallback, self.pinEntered, PinInput, pinList=[ x.value for x in config.ParentalControl.servicepin ], triesEntry=config.ParentalControl.retries.servicepin, title=_("Please enter the correct pin code"), windowTitle=_("Enter pin code")))
def __init__(self, session, show_only_running=False): Screen.__init__(self, session) if config.ParentalControl.configured.value: ProtectedScreen.__init__(self) self.show_only_running = show_only_running list = [] self.list = list self.fillTimerList() print "EMPTY:", self.EMPTY print "ENABLE:", self.ENABLE print "DISABLE:", self.DISABLE print "CLEANUP:", self.CLEANUP print "DELETE:", self.DELETE self["timerlist"] = TimerList(list) self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self["key_red"] = Button(" ") self["key_green"] = Button(_("Add")) self["key_yellow"] = Button(" ") self["key_blue"] = Button(" ") self["Event"] = Event() self["ServiceEvent"] = ServiceEvent() print "key_red_choice:", self.key_red_choice self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.openEdit, "cancel": self.leave, "green": self.addCurrentTimer, "log": self.showLog, "eventview": self.openEventView, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onShown.append(self.updateState)
def __init__(self, session): Screen.__init__(self, session) ProtectedScreen.__init__(self) list = [] self.list = list self.url = None self["timerlist"] = TimerList(list) self["Service"] = ServiceEvent() self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY if self.key_red_choice == StaticText: self["key_red"] = StaticText("") self["key_green"] = StaticText(_("Add")) self["key_yellow"] = StaticText("") self["key_blue"] = StaticText("") self["key_info"] = StaticText("") else: self["key_red"] = Button("") self["key_green"] = Button(_("Add")) self["key_yellow"] = Button("") self["key_blue"] = Button("") self["key_info"] = Button("") self["description"] = Label("") self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.openEdit, "cancel": self.leave, "green": self.addCurrentTimer, "log": self.showLog, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.setTitle(_("Timer overview")) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onShown.append(self.updateState) self.fallbackTimer = FallbackTimerList(self, self.fillTimerList)
def __init__(self, session): Screen.__init__(self, session) Screen.setTitle(self, _('Timer List')) self.onChangedEntry = [] list = [] self.list = list self.fillTimerList() self['timerlist'] = TimerList(list) self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self['key_red'] = Button(' ') self['key_green'] = Button(_('Add')) self['key_yellow'] = Button(' ') self['key_blue'] = Button(' ') self['description'] = Label() self['ServiceEvent'] = ServiceEvent() self['Event'] = Event() self['actions'] = ActionMap( [ 'OkCancelActions', 'DirectionActions', 'ShortcutActions', 'TimerEditActions' ], { 'ok': self.openEdit, 'cancel': self.leave, 'green': self.addCurrentTimer, 'log': self.showLog, 'left': self.left, 'right': self.right, 'up': self.up, 'down': self.down }, -1) self.setTitle(_('Timer overview')) self.onShown.append(self.updateState) if self.isProtected() and config.ParentalControl.servicepin[0].value: self.onFirstExecBegin.append( boundFunction( self.session.openWithCallback, self.pinEntered, PinInput, pinList=[ x.value for x in config.ParentalControl.servicepin ], triesEntry=config.ParentalControl.retries.servicepin, title=_('Please enter the correct pin code'), windowTitle=_('Enter pin code')))
def __init__(self, session, timer, simulate=False): Screen.__init__(self, session) self.skinName = "TimerEditList" self.timer = timer self.simulate = simulate self.list = [] count = 0 for x in timer: self.list.append((timer[count], False)) count += 1 title_text = (": total conflicts %d") % count if simulate: title_text = _(": only notification") if count == 1: title_text = _("Channel not in services list") + title_text else: title_text = _("Timer sanity error") + title_text self.setTitle(title_text) self["timerlist"] = TimerList(self.list) self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(" ") self["key_yellow"] = Button(" ") self["key_blue"] = Button(" ") self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions", "MenuActions" ], { "cancel": self.leave_cancel, "red": self.leave_cancel, "green": self.editTimer, "ok": self.editTimer, "yellow": self.toggleTimer, "blue": self.ignoreConflict, "up": self.up, "down": self.down, "log": self.showLog, "menu": self.openExtendedSetup }, -1) self.onShown.append(self.updateState)
def __init__(self, session): Screen.__init__(self, session) Screen.setTitle(self, _("Timer List")) self.onChangedEntry = [] list = [] self.list = list self.fillTimerList() self["timerlist"] = TimerList(list) self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self["key_red"] = Button(" ") self["key_green"] = Button(_("Add")) self["key_yellow"] = Button(" ") self["key_blue"] = Button(" ") self["description"] = Label() self["ServiceEvent"] = ServiceEvent() self["Event"] = Event() self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.openEdit, "cancel": self.leave, "green": self.addCurrentTimer, "log": self.showLog, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.setTitle(_("Timer overview")) # Disabled because it crashes on some boxes with SSD ###################### #self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) # ######################################################################### self.onShown.append(self.updateState)
def __init__(self, session): Screen.__init__(self, session) Screen.setTitle(self, _("Timer List")) TimerListButtons.__init__(self) self.onChangedEntry = [] list = [] self.list = list self.fillTimerList() self["timerlist"] = TimerList(list) self.buttonActions = ( (None, ""), # EMPTY = 0 (self.removeTimerQuestion, _("Delete")), # DELETE = 1 (self.addCurrentTimer, _("Add")), # ADD = 2 (self.toggleDisabledState, _("Enable")), # ENABLE = 3 (self.toggleDisabledState, _("Disable")), # DISABLE = 4 (self.toggleDisabledState, _("Stop/Disable")), # STOPDISABLE = 5 (self.stopRecording, _("Stop recording")), # STOP = 6 (self.cleanupQuestion, _("Cleanup")), # CLEANUP = 7 ) self["description"] = Label() self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.openEdit, "cancel": self.leave, "log": self.showLog, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.setTitle(_("Timer overview")) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onShown.append(self.updateState)
def __init__(self, session, selectItem=None): Screen.__init__(self, session) self.selectItem = selectItem ProtectedScreen.__init__(self) self.setTitle(_("Timer List")) self.onChangedEntry = [] self.list = [] self["timerlist"] = TimerList(self.list) self.key_red_choice = self.EMPTY self.key_yellow_choice = self.EMPTY self.key_blue_choice = self.EMPTY self["key_red"] = StaticText("") self["key_green"] = StaticText(_("Add")) self["key_yellow"] = StaticText("") self["key_blue"] = StaticText("") self["key_menu"] = StaticText(_("MENU")) self["key_info"] = StaticText(_("INFO")) self["description"] = Label() self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions"], { "ok": self.openEdit, "cancel": self.leave, "green": self.addCurrentTimer, "log": self.showLog, # KEY_INFO "left": self.left, "right": self.right, "up": self.up, "down": self.down, "moveTop": self.moveTop, "moveEnd": self.moveEnd, "menu": self.createSetup }, -1) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onLayoutFinish.append(self.onCreate)
def __init__(self, session): Screen.__init__(self, session) self.skinName = ["EPGSearchTimerImport", "TimerEditList"] self.list = [] self.fillTimerList() self["timerlist"] = TimerList(self.list) self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("OK")) self["key_yellow"] = Button("") self["key_blue"] = Button("") self["actions"] = ActionMap( ["OkCancelActions", "ColorActions"], { "ok": self.search, "cancel": self.cancel, "green": self.search, "red": self.cancel }, -1) self.onLayoutFinish.append(self.setCustomTitle)
def __init__(self, session, menu_path=""): Screen.__init__(self, session) screentitle = _("Timer List") TimerListButtons.__init__(self) self.menu_path = menu_path if config.usage.show_menupath.value == 'large': self.menu_path += screentitle title = self.menu_path self["menu_path_compressed"] = StaticText("") self.menu_path += ' / ' elif config.usage.show_menupath.value == 'small': title = screentitle condtext = "" if self.menu_path and not self.menu_path.endswith(' / '): condtext = self.menu_path + " >" elif self.menu_path: condtext = self.menu_path[:-3] + " >" self["menu_path_compressed"] = StaticText(condtext) self.menu_path += screentitle + ' / ' else: title = screentitle self["menu_path_compressed"] = StaticText("") Screen.setTitle(self, title) self.disable_on_cancel = False self.onChangedEntry = [] list = [] self.list = list self.fillTimerList() self["timerlist"] = TimerList(list) self.buttonActions = ( (None, ""), # EMPTY = 0 (self.removeTimerQuestion, _("Delete")), # DELETE = 1 (self.addCurrentTimer, _("Add")), # ADD = 2 (self.toggleDisabledState, _("Enable")), # ENABLE = 3 (self.toggleDisabledState, _("Disable")), # DISABLE = 4 (self.toggleDisabledState, _("Stop/Disable")), # STOPDISABLE = 5 (self.stopRecording, _("Stop recording")), # STOP = 6 (self.cleanupQuestion, _("Cleanup")), # CLEANUP = 7 ) self["description"] = Label() self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.openEdit, "cancel": self.leave, "log": self.showLog, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onShown.append(self.updateState) if self.isProtected() and config.ParentalControl.servicepin[0].value: self.onFirstExecBegin.append( boundFunction( self.session.openWithCallback, self.pinEntered, PinInput, pinList=[ x.value for x in config.ParentalControl.servicepin ], triesEntry=config.ParentalControl.retries.servicepin, title=_("Please enter the correct pin code"), windowTitle=_("Enter pin code")))
def __init__(self, session, menu_path=""): Screen.__init__(self, session) screentitle = _("Timer List") TimerListButtons.__init__(self) self.menu_path = menu_path ProtectedScreen.__init__(self) if config.usage.show_menupath.value == 'large': self.menu_path += screentitle title = self.menu_path self["menu_path_compressed"] = StaticText("") self.menu_path += ' / ' elif config.usage.show_menupath.value == 'small': title = screentitle condtext = "" if self.menu_path and not self.menu_path.endswith(' / '): condtext = self.menu_path + " >" elif self.menu_path: condtext = self.menu_path[:-3] + " >" self["menu_path_compressed"] = StaticText(condtext) self.menu_path += screentitle + ' / ' else: title = screentitle self["menu_path_compressed"] = StaticText("") Screen.setTitle(self, title) self.disable_on_cancel = False self.onChangedEntry = [] list = [] self.list = list self.fillTimerList() self["timerlist"] = TimerList(list) self.buttonActions = ( (None, ""), # EMPTY = 0 (self.removeTimerQuestion, _("Delete")), # DELETE = 1 (self.addCurrentTimer, _("Add")), # ADD = 2 (self.toggleDisabledState, _("Enable")), # ENABLE = 3 (self.toggleDisabledState, _("Disable")), # DISABLE = 4 (self.toggleDisabledState, _("Stop/Disable")), # STOPDISABLE = 5 (self.stopRecording, _("Stop recording")), # STOP = 6 (self.cleanupQuestion, _("Cleanup")), # CLEANUP = 7 ) self["description"] = Label() self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions", "TimerMediaEPGActions" ], { "ok": self.openEdit, "cancel": self.leave, "media": self.leaveToMedia, "epg": self.leaveToEPG, "log": self.showLog, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.session.nav.RecordTimer.on_state_change.append(self.onStateChange) self.onShown.append(self.updateState)
def __init__(self, session, timer, menu_path=""): Screen.__init__(self, session) TimerListButtons.__init__(self) screentitle = _("Timer sanity error") self.menu_path = menu_path if config.usage.show_menupath.value == 'large': self.menu_path += screentitle title = self.menu_path self["menu_path_compressed"] = StaticText("") self.menu_path += ' / ' elif config.usage.show_menupath.value == 'small': title = screentitle condtext = "" if self.menu_path and not self.menu_path.endswith(' / '): condtext = self.menu_path + " >" elif self.menu_path: condtext = self.menu_path[:-3] + " >" self["menu_path_compressed"] = StaticText(condtext) self.menu_path += screentitle + ' / ' else: title = screentitle self["menu_path_compressed"] = StaticText("") Screen.setTitle(self, title) self.timer = timer print "[TimerEdit] TimerSanityConflict" self["lab1"] = StaticText(_("New timer")) self["lab2"] = StaticText(_("Conflicting timers")) self["timer1"] = TimerList(self.getTimerList(timer[0])) self.list2 = [] count = 0 for x in timer: if count != 0: self.list2.append((timer[count], False)) count += 1 if count == 1: self.list.append((_("Channel not in services list"))) self["timer2"] = TimerList(self.list2) self.buttonActions = ( (None, ""), # EMPTY = 0 (self.editTimer1, _("Edit")), # EDIT1 = 1 (self.editTimer2, _("Edit")), # EDIT2 = 2 (self.toggleTimer, _("Enable")), # ENABLE = 3 (self.toggleTimer, _("Disable")), # DISABLE = 4 (self.toggleTimer, _("Stop & Disable")), # STOPDISABLE = 5 ) self["actions"] = ActionMap( [ "OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions" ], { "ok": self.leave_ok, "cancel": self.leave_cancel, "left": self.left, "right": self.right, "up": self.up, "down": self.down }, -1) self.onShown.append(self.updateState)