X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/02ccc66eb625545cedf7222b0467c077f43c4150..c70d4282351bbe4cd09f07a246221e22652783a2:/lib/python/Components/ServiceList.py diff --git a/lib/python/Components/ServiceList.py b/lib/python/Components/ServiceList.py index 89b40ed2..d008c475 100644 --- a/lib/python/Components/ServiceList.py +++ b/lib/python/Components/ServiceList.py @@ -3,6 +3,8 @@ from GUIComponent import * from enigma import * +from string import upper + class ServiceList(HTMLComponent, GUIComponent): MODE_NORMAL = 0 @@ -28,6 +30,18 @@ class ServiceList(HTMLComponent, GUIComponent): def moveDown(self): self.instance.moveSelection(self.instance.moveDown) + + def moveToChar(self, char): + # TODO fill with life + print "Next char: " + index = self.l.getNextBeginningWithChar(char) + indexup = self.l.getNextBeginningWithChar(upper(char)) + if indexup != 0: + if (index > indexup or index == 0): + index = indexup + + self.instance.moveSelectionTo(index) + print "Moving to character " + str(char) def GUIcreate(self, parent): self.instance = eListbox(parent) @@ -56,6 +70,9 @@ class ServiceList(HTMLComponent, GUIComponent): def setNumberOffset(self, offset): self.l.setNumberOffset(offset) + def setPlayableIgnoreService(self, ref): + self.l.setIgnoreService(ref) + def setRoot(self, root): self.root = root self.l.setRoot(root)