aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/FileList.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2007-07-11 13:09:20 +0000
committerFelix Domke <tmbinc@elitedvb.net>2007-07-11 13:09:20 +0000
commitd007f7c3fe25146548e8050757756aa5375de9e9 (patch)
treed5969639221b55647438186f5199294df2926a2c /lib/python/Components/FileList.py
parent70ab676cbb4229a17a9c2e49d15f7a335c9bf6b0 (diff)
downloadenigma2-d007f7c3fe25146548e8050757756aa5375de9e9.tar.gz
enigma2-d007f7c3fe25146548e8050757756aa5375de9e9.zip
(ralfk) add getCurrentEvent to Filelist
Diffstat (limited to 'lib/python/Components/FileList.py')
-rw-r--r--lib/python/Components/FileList.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py
index 09756e3c..3b02817c 100644
--- a/lib/python/Components/FileList.py
+++ b/lib/python/Components/FileList.py
@@ -59,6 +59,7 @@ class FileList(MenuList, HTMLComponent, GUIComponent):
self.l.setFont(0, gFont("Regular", 18))
self.l.setItemHeight(23)
+ self.serviceHandler = eServiceCenter.getInstance()
def getSelection(self):
if self.l.getCurrentSelection() is None:
@@ -67,7 +68,14 @@ class FileList(MenuList, HTMLComponent, GUIComponent):
def getSelectionIndex(self):
return self.l.getCurrentSelectionIndex()
-
+
+ def getCurrentEvent(self):
+ l = self.l.getCurrentSelection()
+ if not l or l[0][1] == True:
+ return None
+ else:
+ return self.serviceHandler.info(l[0][0]).getEvent(l[0][0])
+
def getFileList(self):
return self.list