- fixed dvb scan
[enigma2.git] / components.py
index 20827180851a82e2900607631c17aff44605f535..8015621f7e1609437d997cc12cbe060cf043514e 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
                        # 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()...)
                        # 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,22 +224,36 @@ class VolumeBar(HTMLComponent, GUIComponent, VariableValue):
                g.setRange(0, 100)
                return g
 
                g.setRange(0, 100)
                return g
 
+
 class MenuList(HTMLComponent, GUIComponent):
 class MenuList(HTMLComponent, GUIComponent):
-       def __init__(self):
+       def __init__(self, list):
                GUIComponent.__init__(self)
                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)
        
        def getCurrent(self):
                return self.l.getCurrentSelection()
        
        def GUIcreateInstance(self, priv, parent, skindata):
                g = eListbox(parent)
-               # BIG BIG HACK. :( we have to ensure that the eListboxPythonStringContent doesn't get destroyed.
-               # we really have to take a look at the GC stuff
-               self.l = eListboxPythonStringContent()
-               self.l.setList(["Test Object 1", "Item #2", "Item #3", "nun kommt eine Zahl:", 15, "Bla fasel", "lulabla"])
                g.setContent(self.l)
                return g
        
        def GUIdeleteInstance(self, g):
                g.setContent(None)
                g.setContent(self.l)
                return g
        
        def GUIdeleteInstance(self, g):
                g.setContent(None)
-               del self.l
+
+class ServiceList(HTMLComponent, GUIComponent):
+       def __init__(self):
+               GUIComponent.__init__(self)
+               self.l = eListboxServiceContent()
+
+       def GUIcreateInstance(self, priv, parent, skindata):
+               g = eListbox(parent)
+               g.setContent(self.l)
+               return g
+       
+       def GUIdeleteInstance(self, g):
+               g.setContent(None)
+
+       def setRoot(self, root):
+               self.l.setRoot(root)