aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-20 23:00:24 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-20 23:00:24 +0000
commit7c961a72f320fb95a6a751f0a6ce7456bf9ce14a (patch)
tree349d5f6b400b5f9f773063534c0c904eef353ecd /lib/python
parent77d577995c4d036b6c84aff0eeba2d76bd209de9 (diff)
downloadenigma2-7c961a72f320fb95a6a751f0a6ce7456bf9ce14a.tar.gz
enigma2-7c961a72f320fb95a6a751f0a6ce7456bf9ce14a.zip
fix selection when delete latest timer in list
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/TimerList.py11
-rw-r--r--lib/python/Screens/TimerEdit.py9
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):