X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/1213cbcff4f8b31aa77825325f102a134d246e0a..85f5c84f1e3e4d22fb1939751d39de03877b93d8:/lib/python/Screens/EpgSelection.py diff --git a/lib/python/Screens/EpgSelection.py b/lib/python/Screens/EpgSelection.py index 6f556003..d6fee567 100644 --- a/lib/python/Screens/EpgSelection.py +++ b/lib/python/Screens/EpgSelection.py @@ -9,6 +9,7 @@ from RecordTimer import RecordTimerEntry, parseEvent from TimerEdit import TimerEditList from TimerEntry import TimerEntry from ServiceReference import ServiceReference +from Components.config import config, currentConfigSelectionElement import xml.dom.minidom @@ -38,16 +39,27 @@ class EPGSelection(Screen): self["actions"] = ChannelActionMap(["EPGSelectActions", "OkCancelActions"], { - "cancel": self.close, + "cancel": self.closeScreen, "ok": self.eventSelected, "timerAdd": self.timerAdd, "yellow": self.yellowButtonPressed, - "blue": self.blueButtonPressed + "blue": self.blueButtonPressed, + "info": self.infoKeyPressed }) self["actions"].csel = self self.onLayoutFinish.append(self.onCreate) + def infoKeyPressed(self): + if currentConfigSelectionElement(config.usage.epgtoggle) == "yes": + self.close(True) + else: + self.close(False) + + def closeScreen(self): + self.close(False) + + #just used in multipeg def onCreate(self): l = self["list"] @@ -109,7 +121,7 @@ class EPGSelection(Screen): self.session.openWithCallback(self.timerEditFinished, TimerEntry, newEntry) def timerEditFinished(self, answer): - if (answer[0]): + if answer[0]: self.session.nav.RecordTimer.record(answer[1]) else: print "Timeredit aborted"