X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/c0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3..54042f13aaa98b655f0dfa907ef326430ec65d39:/lib/python/Components/MenuList.py diff --git a/lib/python/Components/MenuList.py b/lib/python/Components/MenuList.py index b1b115b7..876300bd 100644 --- a/lib/python/Components/MenuList.py +++ b/lib/python/Components/MenuList.py @@ -1,5 +1,5 @@ -from HTMLComponent import * -from GUIComponent import * +from HTMLComponent import HTMLComponent +from GUIComponent import GUIComponent from enigma import eListboxPythonStringContent, eListbox @@ -30,12 +30,16 @@ class MenuList(HTMLComponent, GUIComponent): for f in self.onSelectionChanged: f() + def getSelectedIndex(self): + return self.l.getCurrentSelectionIndex() + def setList(self, list): self.list = list self.l.setList(self.list) def moveToIndex(self, idx): - self.instance.moveSelectionTo(idx) + if self.instance is not None: + self.instance.moveSelectionTo(idx) def pageUp(self): if self.instance is not None: