X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FMenuList.py;h=f4b2c361c7ed17bfc480f2a80b3ed1e2206061b1;hp=0e33719860ef5019294bd0dfcd0caa2a1734dc8b;hb=c803490aec2d7c7f13966e1a2e926cac018dea2e;hpb=59cee6bc80d4697bec7bebb8dd65312bddec34ad diff --git a/lib/python/Components/MenuList.py b/lib/python/Components/MenuList.py index 0e33719..f4b2c36 100644 --- a/lib/python/Components/MenuList.py +++ b/lib/python/Components/MenuList.py @@ -4,12 +4,13 @@ from GUIComponent import * from enigma import eListboxPythonStringContent, eListbox class MenuList(HTMLComponent, GUIComponent): - def __init__(self, list): + def __init__(self, list, enableWrapAround=False): GUIComponent.__init__(self) self.list = list self.l = eListboxPythonStringContent() self.l.setList(self.list) self.onSelectionChanged = [ ] + self.enableWrapAround = enableWrapAround def getCurrent(self): return self.l.getCurrentSelection() @@ -18,6 +19,8 @@ class MenuList(HTMLComponent, GUIComponent): self.instance = eListbox(parent) self.instance.setContent(self.l) self.instance.selectionChanged.get().append(self.selectionChanged) + if self.enableWrapAround: + self.instance.setWrapAround(True) def GUIdelete(self): self.instance.setContent(None) @@ -52,4 +55,4 @@ class MenuList(HTMLComponent, GUIComponent): def selectionEnabled(self, enabled): if self.instance is not None: - self.instance.setSelectionEnable(enabled) \ No newline at end of file + self.instance.setSelectionEnable(enabled)