cut away 1/4th of enigma loading time by loading languages when they are used
[enigma2.git] / lib / python / Components / MenuList.py
index b1b115b7230aa6a9ebe1d6041b08e2f335f212a4..876300bd615a59741c574d1a25558bfe60002ed7 100644 (file)
@@ -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: