aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/ConfigList.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-10-07 13:16:24 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-10-07 13:16:24 +0000
commitcbc5ef9c7959c734926472f0978a9f43ffa7381c (patch)
tree1a5920ffc27a645a0f676e00db72ec14c865e7e8 /lib/python/Components/ConfigList.py
parente5a909e610fcd24a0bb6d7b1a586a14cd9767512 (diff)
downloadenigma2-cbc5ef9c7959c734926472f0978a9f43ffa7381c.tar.gz
enigma2-cbc5ef9c7959c734926472f0978a9f43ffa7381c.zip
verify that ConfigList entries are ConfigElements
Diffstat (limited to 'lib/python/Components/ConfigList.py')
-rw-r--r--lib/python/Components/ConfigList.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/python/Components/ConfigList.py b/lib/python/Components/ConfigList.py
index dc10045c..c93b10f7 100644
--- a/lib/python/Components/ConfigList.py
+++ b/lib/python/Components/ConfigList.py
@@ -1,6 +1,6 @@
from HTMLComponent import *
from GUIComponent import *
-from config import KEY_LEFT, KEY_RIGHT, KEY_0, KEY_DELETE, KEY_OK, KEY_TIMEOUT
+from config import KEY_LEFT, KEY_RIGHT, KEY_0, KEY_DELETE, KEY_OK, KEY_TIMEOUT, ConfigElement
from Components.ActionMap import NumberActionMap
from enigma import eListbox, eListboxPythonConfigContent, eTimer
@@ -70,10 +70,14 @@ class ConfigList(HTMLComponent, GUIComponent, object):
def preWidgetRemove(self, instance):
instance.selectionChanged.get().remove(self.selectionChanged)
- def setList(self, list):
- self.__list = list
+ def setList(self, l):
+ self.__list = l
self.l.setList(self.__list)
+ if l is not None:
+ for x in l:
+ assert isinstance(x[1], ConfigElement), "entry in ConfigList " + str(x[1]) + " must be a ConfigElement"
+
def getList(self):
return self.__list
@@ -101,7 +105,7 @@ class ConfigListScreen:
"9": self.keyNumberGlobal,
"0": self.keyNumberGlobal
}, -1) # to prevent left/right overriding the listbox
-
+
self["config"] = ConfigList(list, session = session)
def keyOK(self):