revert non working "goto standby" after timerevent code (needs some work in
[enigma2.git] / lib / python / Screens / TimerEntry.py
index b146ecf3b41516330e5a5ae28ed4d96f88b90335..1c83bdb6d3adf4ffd16d11e4b6b9d483d6589634 100644 (file)
@@ -21,6 +21,10 @@ class TimerEntry(Screen, ConfigListScreen):
                Screen.__init__(self, session)
                self.timer = timer
                
+               self.entryStartDate = None
+               self.entryEndDate = None
+               self.entryService = None
+               
                self["oktext"] = Label(_("OK"))
                self["canceltext"] = Label(_("Cancel"))
                self["ok"] = Pixmap()
@@ -114,11 +118,11 @@ class TimerEntry(Screen, ConfigListScreen):
                if configElement is self.timerentry_startdate:
                        if self.timerentry_enddate.value < self.timerentry_startdate.value:
                                self.timerentry_enddate.value = self.timerentry_startdate.value
-                               self["config"].invalidate(self.timerentry_enddate)
+                               self["config"].invalidate(self.entryEndDate)
                if configElement is self.timerentry_enddate:
                        if (self.timerentry_enddate.value < self.timerentry_startdate.value):
                                self.timerentry_startdate.value = self.timerentry_enddate.value
-                               self["config"].invalidate(self.timerentry_startdate)
+                               self["config"].invalidate(self.entryStartDate)
 
        def createSetup(self, widget):
                self.list = []
@@ -153,15 +157,17 @@ class TimerEntry(Screen, ConfigListScreen):
                        #self.list.append(getConfigListEntry("StartDate", self.timerentry_startdate))
 #              self.list.append(getConfigListEntry("Weekday", self.timerentry_weekday))
 
+               self.entryStartDate = getConfigListEntry(_("Start"), self.timerentry_startdate)
                if self.timerentry_type.value == "once":
-                       self.list.append(getConfigListEntry(_("Start"), self.timerentry_startdate))
+                       self.list.append(self.entryStartDate)
                        self.list.append(getConfigListEntry(" ", self.timerentry_starttime))
                else:
                        self.list.append(getConfigListEntry(_("StartTime"), self.timerentry_starttime))
 
+               self.entryEndDate = getConfigListEntry(_("End"), self.timerentry_enddate)
                if self.timerentry_type.value == "once":
                        if self.timerentry_justplay.value != "zap":
-                               self.list.append(getConfigListEntry(_("End"), self.timerentry_enddate))
+                               self.list.append(self.entryEndDate)
                                self.list.append(getConfigListEntry(" ", self.timerentry_endtime))
                else:
                        if self.timerentry_justplay.value != "zap":
@@ -192,12 +198,6 @@ class TimerEntry(Screen, ConfigListScreen):
                        ConfigListScreen.keyLeft(self)
                        self.newConfig()
 
-       def keyRightCallback(self, configPath):
-               currentConfigPath = self["config"].getCurrent()[1].parent.getConfigPath()
-               # check if we are still on the same config entry
-               if (currentConfigPath == configPath):
-                       self.keyRight()
-
        def keyRight(self):
                if self["config"].getCurrent() is self.channelEntry:
                        self.keySelect()
@@ -214,8 +214,8 @@ class TimerEntry(Screen, ConfigListScreen):
        def finishedChannelSelection(self, *args):
                if len(args):
                        self.timer.service_ref = ServiceReference(args[0])
-                       self.timerentry_service.vals = (str(self.timer.service_ref.getServiceName()),)
-                       self["config"].invalidate(self.timerentry_service)
+                       self.timerentry_service.setCurrentText(self.timer.service_ref.getServiceName())
+                       self["config"].invalidate(self.channelEntry)
 
        def getTimestamp(self, date, mytime):
                d = time.localtime(date)
@@ -337,7 +337,7 @@ class TimerLog(Screen):
        def fillLogList(self):
                self.list = [ ]
                for x in self.log_entries:
-                       self.list.append((str(time.strftime("%Y-%m-%d %H-%M", localtime(x[0])) + " - " + x[2]), x))
+                       self.list.append((str(time.strftime("%Y-%m-%d %H-%M", time.localtime(x[0])) + " - " + x[2]), x))
        
        def clearLog(self):             
                self.log_entries = []