- add fake "main menu"
[enigma2.git] / components.py
index 8115ecf420bd7b9e3bea285bfa705487483585a8..bd4c068f39854f57dc4f28fc304b7c2af21664d7 100644 (file)
@@ -60,7 +60,7 @@ class GUISkin:
                        # way of having refcounted objects. So it must be in python.)
                        #
                        # It could be possible that you're calling deleteGUIscreen trough a call of
-                       # a PSignal. For example, you could try to call session.close() in response
+                       # a PSignal. For example, you could try to call screen.doClose() in response
                        # to a Button::click. This will fail. (It wouldn't work anyway, as you would
                        # remove a dialog while running it. It never worked - enigma1 just set a 
                        # per-mainloop variable on eWidget::close() to leave the exec()...)
@@ -224,10 +224,20 @@ class VolumeBar(HTMLComponent, GUIComponent, VariableValue):
                g.setRange(0, 100)
                return g
 
+
 class MenuList(HTMLComponent, GUIComponent):
-       def __init__(self):
+       def __init__(self, list):
                GUIComponent.__init__(self)
+               self.l = eListboxPythonStringContent()
+               self.l.setList(list)
+       
+       def getCurrent(self):
+               return self.l.getCurrentSelection()
        
        def GUIcreateInstance(self, priv, parent, skindata):
                g = eListbox(parent)
+               g.setContent(self.l)
                return g
+       
+       def GUIdeleteInstance(self, g):
+               g.setContent(None)