From 80ef0607da0eb2f695e5d6d63ac13c842a9abeea Mon Sep 17 00:00:00 2001 From: Moritz Venn Date: Sat, 12 Feb 2011 01:09:18 +0100 Subject: [PATCH] EPGRefreshConfiguration.py: show last refresh date/time on info pressed --- epgrefresh/src/EPGRefreshConfiguration.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/epgrefresh/src/EPGRefreshConfiguration.py b/epgrefresh/src/EPGRefreshConfiguration.py index 0bea585d..8e2502f8 100644 --- a/epgrefresh/src/EPGRefreshConfiguration.py +++ b/epgrefresh/src/EPGRefreshConfiguration.py @@ -85,12 +85,13 @@ class EPGRefreshConfiguration(Screen, ConfigListScreen): self["help"] = StaticText() # Define Actions - self["actions"] = ActionMap(["SetupActions", "ColorActions"], + self["actions"] = ActionMap(["SetupActions", "ColorActions", "ChannelSelectEPGActions"], { "cancel": self.keyCancel, "save": self.keySave, "yellow": self.forceRefresh, - "blue": self.editServices + "blue": self.editServices, + "showEPGList": self.keyInfo, } ) @@ -147,6 +148,22 @@ class EPGRefreshConfiguration(Screen, ConfigListScreen): self.close(self.session) + def keyInfo(self): + from Screens.MessageBox import MessageBox + + lastscan = config.plugins.epgrefresh.lastscan.value + if lastscan: + from Tools.FuzzyDate import FuzzyTime + scanDate = ', '.join(FuzzyTime(lastscan)) + else: + scanDate = _("never") + + self.session.open( + MessageBox, + _("Last refresh was %s") % (scanDate,), + type=MessageBox.TYPE_INFO + ) + def keyCancel(self): if self["config"].isChanged(): from Screens.MessageBox import MessageBox -- 2.20.1