X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/aa3e781f31a04223416f0a34b25ab95fc0bef429..f097c3b368c10b7c88f63038459c4c5a38889a1f:/lib/python/Components/PerServiceDisplay.py diff --git a/lib/python/Components/PerServiceDisplay.py b/lib/python/Components/PerServiceDisplay.py index bd94318e..fe501052 100644 --- a/lib/python/Components/PerServiceDisplay.py +++ b/lib/python/Components/PerServiceDisplay.py @@ -1,8 +1,9 @@ from GUIComponent import * from VariableText import * +from VariableValue import * -from enigma import pNavigation -from enigma import eLabel +from enigma import iPlayableService +from enigma import eLabel, eSlider class PerServiceDisplay(GUIComponent, VariableText): """Mixin for building components which display something which changes on navigation events, for example "service name" """ @@ -15,7 +16,7 @@ class PerServiceDisplay(GUIComponent, VariableText): self.navcore.event.append(self.event) # start with stopped state, so simulate that - self.event(pNavigation.evStopService) + self.event(iPlayableService.evEnd) def event(self, ev): # loop up if we need to handle this event @@ -23,8 +24,26 @@ class PerServiceDisplay(GUIComponent, VariableText): # call handler self.eventmap[ev]() - def createWidget(self, parent, skindata): + def createWidget(self, parent): # by default, we use a label to display our data. g = eLabel(parent) return g + +class PerServiceDisplayProgress(GUIComponent, VariableValue, PerServiceDisplay): + def __init__(self, navcore, eventmap): + GUIComponent.__init__(self) + VariableValue.__init__(self) + self.eventmap = eventmap + self.navcore = navcore + self.navcore.event.append(self.event) + + # start with stopped state, so simulate that + self.event(iPlayableService.evEnd) + + + def createWidget(self, parent): + # by default, we use a label to display our data. + self.g = eSlider(parent) + return self.g + \ No newline at end of file