add possibility to invalidate configList entrys other than the current one
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 13 Nov 2005 11:20:09 +0000 (11:20 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 13 Nov 2005 11:20:09 +0000 (11:20 +0000)
lib/python/Components/ConfigList.py
lib/python/Screens/TimerEntry.py

index e95f8c0..7ed0001 100644 (file)
@@ -27,7 +27,14 @@ class ConfigList(HTMLComponent, GUIComponent):
        
        def invalidateCurrent(self):
                self.l.invalidateEntry(self.l.getCurrentSelectionIndex())
        
        def invalidateCurrent(self):
                self.l.invalidateEntry(self.l.getCurrentSelectionIndex())
-
+               
+       def invalidate(self, entry):
+               i = 0
+               for x in self.list:
+                       if (entry.getConfigPath() == x[1].parent.getConfigPath()):
+                               self.l.invalidateEntry(i)
+                       i += 1
+               
        def GUIcreate(self, parent):
                self.instance = eListbox(parent)
                self.instance.setContent(self.l)
        def GUIcreate(self, parent):
                self.instance = eListbox(parent)
                self.instance.setContent(self.l)
index d8f44c9..14aa1ce 100644 (file)
@@ -71,12 +71,12 @@ class TimerEntry(Screen):
             if (config.timerentry.enddate.value < config.timerentry.startdate.value):
                 config.timerentry.enddate.value = config.timerentry.startdate.value
                 config.timerentry.enddate.change()
             if (config.timerentry.enddate.value < config.timerentry.startdate.value):
                 config.timerentry.enddate.value = config.timerentry.startdate.value
                 config.timerentry.enddate.change()
-                #FIXME invalidate the config-entry... for redrawing purposes - HOW?
+                self["config"].invalidate(config.timerentry.enddate)
         if (configElement.getConfigPath() == "config.timerentry.enddate"):
             if (config.timerentry.enddate.value < config.timerentry.startdate.value):
                 config.timerentry.startdate.value = config.timerentry.enddate.value
                 config.timerentry.startdate.change()
         if (configElement.getConfigPath() == "config.timerentry.enddate"):
             if (config.timerentry.enddate.value < config.timerentry.startdate.value):
                 config.timerentry.startdate.value = config.timerentry.enddate.value
                 config.timerentry.startdate.change()
-                #FIXME invalidate the config-entry... for redrawing purposes - HOW?
+                self["config"].invalidate(config.timerentry.startdate)
 
     def createSetup(self):
         self.list = []
 
     def createSetup(self):
         self.list = []