X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/aa3e781f31a04223416f0a34b25ab95fc0bef429..703e28ce14566d6093d98feca0c96a0468936747:/lib/python/Components/MenuList.py diff --git a/lib/python/Components/MenuList.py b/lib/python/Components/MenuList.py index 90cd3286..40898095 100644 --- a/lib/python/Components/MenuList.py +++ b/lib/python/Components/MenuList.py @@ -6,18 +6,23 @@ from enigma import eListboxPythonStringContent, eListbox class MenuList(HTMLComponent, GUIComponent): def __init__(self, list): GUIComponent.__init__(self) + self.list = list self.l = eListboxPythonStringContent() - self.l.setList(list) + self.l.setList(self.list) + self.onSelectionChanged = [ ] def getCurrent(self): return self.l.getCurrentSelection() - def GUIcreate(self, parent, skindata): + def GUIcreate(self, parent): self.instance = eListbox(parent) self.instance.setContent(self.l) + self.instance.selectionChanged.get().append(self.selectionChanged) def GUIdelete(self): self.instance.setContent(None) self.instance = None - + def selectionChanged(self): + for f in self.onSelectionChanged: + f()