include Python.h before all other header files
[enigma2.git] / lib / python / Components / SelectionList.py
index 6019fffab40d7bb1d0c361201502fe673cf82d8d..10b1d531248ca9115da373d190cc5e7bbfb0cc5a 100644 (file)
@@ -1,9 +1,10 @@
 from GUIComponent import GUIComponent
 from MenuList import MenuList
 from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE
-from enigma import eListboxPythonMultiContent, loadPNG, eListbox, gFont, RT_HALIGN_LEFT
+from enigma import eListboxPythonMultiContent, eListbox, gFont, RT_HALIGN_LEFT
+from Tools.LoadPixmap import LoadPixmap
 
-selectionpng = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "selectioncross-fs8.png"))
+selectionpng = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "selectioncross-fs8.png"))
 
 def SelectionEntryComponent(description, value, index, selected):
        res = [ (description, value, index, selected) ]
@@ -13,11 +14,11 @@ def SelectionEntryComponent(description, value, index, selected):
        return res
 
 class SelectionList(MenuList, GUIComponent):
-       def __init__(self, list = []):
+       def __init__(self, list = None):
                GUIComponent.__init__(self)
                self.l = eListboxPythonMultiContent()
-               self.list = list
-               self.setList(list)
+               self.list = list or []
+               self.setList(self.list)
                self.l.setFont(0, gFont("Regular", 20))
                self.l.setItemHeight(30)
 
@@ -40,4 +41,4 @@ class SelectionList(MenuList, GUIComponent):
                for item in self.list:
                        if item[0][3]:
                                list.append((item[0][0], item[0][1], item[0][2]))
-               return list
\ No newline at end of file
+               return list