From ebd311a360520b661c0853bfbef643620bbcfda7 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sun, 13 Nov 2005 11:20:09 +0000 Subject: [PATCH] add possibility to invalidate configList entrys other than the current one --- lib/python/Components/ConfigList.py | 9 ++++++++- lib/python/Screens/TimerEntry.py | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/python/Components/ConfigList.py b/lib/python/Components/ConfigList.py index e95f8c0e..7ed00014 100644 --- a/lib/python/Components/ConfigList.py +++ b/lib/python/Components/ConfigList.py @@ -27,7 +27,14 @@ class ConfigList(HTMLComponent, GUIComponent): 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) diff --git a/lib/python/Screens/TimerEntry.py b/lib/python/Screens/TimerEntry.py index d8f44c91..14aa1ce3 100644 --- a/lib/python/Screens/TimerEntry.py +++ b/lib/python/Screens/TimerEntry.py @@ -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() - #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() - #FIXME invalidate the config-entry... for redrawing purposes - HOW? + self["config"].invalidate(config.timerentry.startdate) def createSetup(self): self.list = [] -- 2.30.2