X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FScreens%2FEpgSelection.py;h=edad3596ab24e2241ce1a15d54b13da86ff8360e;hp=0092989df92e3ac58064d720fe893c0b4630313f;hb=04f4636324ab06c5a3a4f618100048e159eaf6f9;hpb=39f705dd80ae8b9e30ff2a76e1089b3cf0d3b4c1 diff --git a/lib/python/Screens/EpgSelection.py b/lib/python/Screens/EpgSelection.py index 0092989..edad359 100644 --- a/lib/python/Screens/EpgSelection.py +++ b/lib/python/Screens/EpgSelection.py @@ -36,6 +36,8 @@ class EPGSelection(Screen): self["key_blue"] = Button() self.currentService=ServiceReference(service) self.zapFunc = None + self.sort_type = 0 + self.setSortDescription() else: self.skinName = "EPGSelectionMulti" self.type = EPG_TYPE_MULTI @@ -57,11 +59,7 @@ class EPGSelection(Screen): self["key_green"] = Button(_("Add timer")) self["list"] = EPGList(type = self.type, selChangedCB = self.onSelectionChanged, timer = self.session.nav.RecordTimer) - class ChannelActionMap(ActionMap): - def action(self, contexts, action): - return ActionMap.action(self, contexts, action) - - self["actions"] = ChannelActionMap(["EPGSelectActions", "OkCancelActions"], + self["actions"] = ActionMap(["EPGSelectActions", "OkCancelActions"], { "cancel": self.closeScreen, "ok": self.eventSelected, @@ -160,6 +158,21 @@ class EPGSelection(Screen): def yellowButtonPressed(self): if self.type == EPG_TYPE_MULTI: self["list"].updateMultiEPG(-1) + elif self.type == EPG_TYPE_SINGLE: + if self.sort_type == 0: + self.sort_type = 1 + else: + self.sort_type = 0 + self["list"].sortSingleEPG(self.sort_type) + self.setSortDescription() + + def setSortDescription(self): + if self.sort_type == 1: + # TRANSLATORS: This must fit into the header button in the EPG-List + self["key_yellow"].setText(_("Sort Time")) + else: + # TRANSLATORS: This must fit into the header button in the EPG-List + self["key_yellow"].setText(_("Sort A-Z")) def blueButtonPressed(self): if self.type == EPG_TYPE_MULTI: @@ -171,7 +184,7 @@ class EPGSelection(Screen): serviceref = cur[1] if event is None: return - newEntry = RecordTimerEntry(serviceref, checkOldTimers = True, *parseEvent(event)) + newEntry = RecordTimerEntry(serviceref, checkOldTimers = True, dirname = config.movielist.last_timer_videodir.value, *parseEvent(event)) self.session.openWithCallback(self.timerEditFinished, TimerEntry, newEntry) def timerEditFinished(self, answer):