X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/8f7dbc5ddb0e674364866b0e41ba42b55c6db8bf..c2bbed774d6e5c51b4af23a60a95aca74aa5d4e9:/lib/python/Components/ParentalControlList.py diff --git a/lib/python/Components/ParentalControlList.py b/lib/python/Components/ParentalControlList.py index 9791e1b0..71912620 100644 --- a/lib/python/Components/ParentalControlList.py +++ b/lib/python/Components/ParentalControlList.py @@ -1,22 +1,11 @@ -from HTMLComponent import * -from GUIComponent import * - from MenuList import MenuList from Components.ParentalControl import parentalControl -from Tools.Directories import * - -from enigma import * +from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename -RT_HALIGN_LEFT = 0 -RT_HALIGN_RIGHT = 1 -RT_HALIGN_CENTER = 2 -RT_HALIGN_BLOCK = 4 +from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT +from Tools.LoadPixmap import LoadPixmap -RT_VALIGN_TOP = 0 -RT_VALIGN_CENTER = 8 -RT_VALIGN_BOTTOM = 16 - -lockPicture = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "lock-fs8.png")) +lockPicture = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock.png")) def ParentalControlEntryComponent(service, name, locked = True): res = [ (service, name, locked) ] @@ -25,23 +14,11 @@ def ParentalControlEntryComponent(service, name, locked = True): res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 0, 32, 32, lockPicture)) return res -class ParentalControlList(MenuList, HTMLComponent, GUIComponent): - def __init__(self, list): - GUIComponent.__init__(self) - self.l = eListboxPythonMultiContent() - self.list = list - self.l.setList(list) +class ParentalControlList(MenuList): + def __init__(self, list, enableWrapAround = False): + MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent) self.l.setFont(0, gFont("Regular", 20)) - - GUI_WIDGET = eListbox - - def setList(self, list): - self.list = list - self.l.setList(list) - - def postWidgetCreate(self, instance): - instance.setContent(self.l) - instance.setItemHeight(32) + self.l.setItemHeight(32) def toggleSelectedLock(self): print "self.l.getCurrentSelection():", self.l.getCurrentSelection()