From a8f3a47d541932f5d122623321f7ac5b758aa35a Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sun, 27 Nov 2005 23:04:51 +0000 Subject: [PATCH] fix ChannelSelectionBase to work with SimpleChannelSelection channelselection is now opened when pressing left/right in the TimerEntry --- lib/python/Screens/ChannelSelection.py | 2 ++ lib/python/Screens/TimerEntry.py | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 8951770..0534a78 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -223,6 +223,8 @@ class ChannelSelectionBase(Screen): self.servicelist = self["list"] #self["okbutton"] = Button("ok", [self.channelSelected]) + + self.lastService = None self.lastServiceTimer = eTimer() self.lastServiceTimer.timeout.get().append(self.lastService) diff --git a/lib/python/Screens/TimerEntry.py b/lib/python/Screens/TimerEntry.py index e649666..b73b7c0 100644 --- a/lib/python/Screens/TimerEntry.py +++ b/lib/python/Screens/TimerEntry.py @@ -95,7 +95,12 @@ class TimerEntry(Screen): # FIXME some service-chooser needed here - config.timerentry.service = configElement_nonSave("config.timerentry.service", configSelection, 0, ((str(self.timer.service_ref.getServiceName())),)) + servicename = "N/A" + try: # no current service available? + servicename = str(self.timer.service_ref.getServiceName()) + except: + pass + config.timerentry.service = configElement_nonSave("config.timerentry.service", configSelection, 0, ((servicename),)) config.timerentry.startdate.addNotifier(self.checkDate) config.timerentry.enddate.addNotifier(self.checkDate) @@ -164,8 +169,11 @@ class TimerEntry(Screen): self.createSetup() def keyLeft(self): - self["config"].handleKey(config.key["prevElement"]) - self.newConfig() + if self["config"].getCurrent()[0] == _("Channel"): + self.keySelect() + else: + self["config"].handleKey(config.key["prevElement"]) + self.newConfig() def keyRightCallback(self, configPath): currentConfigPath = self["config"].getCurrent()[1].parent.getConfigPath() @@ -174,8 +182,11 @@ class TimerEntry(Screen): self.keyRight() def keyRight(self): - self["config"].handleKey(config.key["nextElement"]) - self.newConfig() + if self["config"].getCurrent()[0] == _("Channel"): + self.keySelect() + else: + self["config"].handleKey(config.key["nextElement"]) + self.newConfig() def keySelect(self): if self["config"].getCurrent()[0] == _("Channel"): -- 2.7.4