aboutsummaryrefslogtreecommitdiff
path: root/components.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-01-29 04:36:01 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-01-29 04:36:01 +0000
commit2590d97005eecab111a4bf8476da9eb1c700654c (patch)
treea220d519aae546a2cd6481004117e3de1d9a5c32 /components.py
parentcd621fe499141885e5a0d8b4e42a0f8a7f41a9ac (diff)
downloadenigma2-2590d97005eecab111a4bf8476da9eb1c700654c.tar.gz
enigma2-2590d97005eecab111a4bf8476da9eb1c700654c.zip
- minor bugfix (allow empty content)
- allow tuples as list elements - fake main menu
Diffstat (limited to 'components.py')
-rw-r--r--components.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/components.py b/components.py
index 52c94606..76423387 100644
--- a/components.py
+++ b/components.py
@@ -224,23 +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()
- return "none"
+ 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
- l = eListboxPythonStringContent()
- l.setList(["Test Object 1", "Item #2", "Item #3", "nun kommt eine Zahl:", 15, "Bla fasel", "lulabla"])
- g.setContent(l)
+ g.setContent(self.l)
return g
def GUIdeleteInstance(self, g):
g.setContent(None)
- #del self.l