1 from GUIComponent import *
2 from VariableText import *
4 from enigma import pNavigation
5 from enigma import eLabel
7 class PerServiceDisplay(GUIComponent, VariableText):
8 """Mixin for building components which display something which changes on navigation events, for example "service name" """
10 def __init__(self, navcore, eventmap):
11 GUIComponent.__init__(self)
12 VariableText.__init__(self)
13 self.eventmap = eventmap
14 self.navcore = navcore
15 self.navcore.event.append(self.event)
17 # start with stopped state, so simulate that
18 self.event(pNavigation.evStopService)
21 # loop up if we need to handle this event
22 if self.eventmap.has_key(ev):
26 def createWidget(self, parent):
27 # by default, we use a label to display our data.