def __init__(self, session, autotimer): Screen.__init__(self, session) HelpableScreen.__init__(self) # Save autotimer self.autotimer = autotimer self.changed = False # Button Labels self["key_red"] = StaticText(_("Timers list")) self["key_green"] = StaticText(_("Save and search now")) self["key_yellow"] = StaticText(_("Delete")) self["key_blue"] = StaticText(_("Add")) # Create List of Timers self["entries"] = AutoTimerList(autotimer.getSortedTupleTimerList()) # Summary self.onChangedEntry = [] self["entries"].onSelectionChanged.append(self.selectionChanged) # Define Actions self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", { "ok": (self.ok, _("Edit selected AutoTimer")), "cancel": (self.cancel, _("Close and forget changes")), } ) self["MenuActions"] = HelpableActionMap(self, "MenuActions", { "menu": (self.menu, _("Open Context Menu")) } ) self["EPGSelectActions"] = HelpableActionMap(self, "EPGSelectActions", { "info": (self.showSearchLog, _("Show last SearchLog")), } ) self["InfobarActions"] = HelpableActionMap(self, "InfobarActions", { "showTv": (self.showFilterTxt, _("Show AutoTimer FilterTxt")), "toggleTvRadio": (self.showFilterTxt, _("Show AutoTimer FilterTxt")), } ) self["ColorActions"] = HelpableActionMap(self, "ColorActions", { "red": (self.timer_menu, _("Open Timers list")), "green": (self.save, _("Close, save changes and search now")), "yellow": (self.remove, _("Remove selected AutoTimer")), "blue": (self.add, _("Add new AutoTimer")), } ) self.onLayoutFinish.append(self.setCustomTitle) self.onFirstExecBegin.append(self.firstExec)
def __init__(self, session, autotimer): Screen.__init__(self, session) HelpableScreen.__init__(self) # Save autotimer self.autotimer = autotimer self.changed = False # Button Labels self["key_green"] = StaticText(_("Save")) self["key_yellow"] = StaticText(_("Delete")) self["key_blue"] = StaticText(_("Add")) # Create List of Timers self["entries"] = AutoTimerList(autotimer.getSortedTupleTimerList()) # Summary self.onChangedEntry = [] self["entries"].onSelectionChanged.append(self.selectionChanged) # Define Actions self["OkCancelActions"] = HelpableActionMap( self, "OkCancelActions", { "ok": (self.ok, _("Edit selected AutoTimer")), "cancel": (self.cancel, _("Close and forget changes")), }) self["MenuActions"] = HelpableActionMap( self, "MenuActions", {"menu": (self.menu, _("Open Context Menu"))}) self["ColorActions"] = HelpableActionMap( self, "ColorActions", { "green": (self.save, _("Close and save changes")), "yellow": (self.remove, _("Remove selected AutoTimer")), "blue": (self.add, _("Add new AutoTimer")), }) self.onLayoutFinish.append(self.setCustomTitle)