diff options
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/TimerList.py | 11 | ||||
| -rw-r--r-- | lib/python/Screens/TimerEdit.py | 9 |
2 files changed, 17 insertions, 3 deletions
diff --git a/lib/python/Components/TimerList.py b/lib/python/Components/TimerList.py index d79187d1..8bb6a0d9 100644 --- a/lib/python/Components/TimerList.py +++ b/lib/python/Components/TimerList.py @@ -76,7 +76,16 @@ class TimerList(HTMLComponent, GUIComponent): self.instance = eListbox(parent) self.instance.setContent(self.l) self.instance.setItemHeight(70) - + + def moveToIndex(self, index): + self.instance.moveSelectionTo(index) + + def getCurrentIndex(self): + return self.instance.getCurrentIndex() + + def moveDown(self): + self.instance.moveSelection(self.instance.moveDown) + def GUIdelete(self): self.instance.setContent(None) self.instance = None diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py index 560ec942..c0896f41 100644 --- a/lib/python/Screens/TimerEdit.py +++ b/lib/python/Screens/TimerEdit.py @@ -48,8 +48,13 @@ class TimerEditList(Screen): #self.session.open(TimerEdit, self["timerlist"].getCurrent()[0]) def removeTimer(self): - # FIXME doesn't work... - self.session.nav.RecordTimer.removeEntry(self["timerlist"].getCurrent()[0]) + list = self["timerlist"] + currentIndex = list.getCurrentIndex() + list.moveDown() + if list.getCurrentIndex() == currentIndex: + currentIndex -= 1 + list.moveToIndex(currentIndex) + self.session.nav.RecordTimer.removeEntry(list.getCurrent()[0]) self.refill() def refill(self): |
