From: Andreas Monzner Date: Fri, 15 Feb 2008 16:11:57 +0000 (+0000) Subject: simplify, cleanup and fix ParentalControlList X-Git-Tag: 2.6.0~1529 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/120489191dacf22ee4f878e6dd4c8dca06a29545 simplify, cleanup and fix ParentalControlList --- diff --git a/lib/python/Components/ParentalControlList.py b/lib/python/Components/ParentalControlList.py index 489cb130..602e1e5f 100644 --- a/lib/python/Components/ParentalControlList.py +++ b/lib/python/Components/ParentalControlList.py @@ -1,6 +1,3 @@ -from HTMLComponent import HTMLComponent -from GUIComponent import GUIComponent - from MenuList import MenuList from Components.ParentalControl import parentalControl from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename @@ -17,24 +14,12 @@ 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)) self.l.setItemHeight(32) - GUI_WIDGET = eListbox - - def setList(self, list): - self.list = list - self.l.setList(list) - - def postWidgetCreate(self, instance): - instance.setContent(self.l) - def toggleSelectedLock(self): print "self.l.getCurrentSelection():", self.l.getCurrentSelection() print "self.l.getCurrentSelectionIndex():", self.l.getCurrentSelectionIndex()