fix ChannelSelectionBase to work with SimpleChannelSelection
[enigma2.git] / lib / python / Screens / TimerEntry.py
index e649666f5acf083bccde6f23f8e89c38460caafd..b73b7c0dfcad9c2af9005a1a6a7f31f3c1dc2910 100644 (file)
@@ -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"):