dont show display contrast setting in display setup when a oled is detected
[enigma2.git] / lib / python / Components / Sources / CurrentService.py
1 from Components.PerServiceDisplay import PerServiceBase
2 from enigma import iPlayableService
3 from Source import Source
4 from Components.Element import cached
5
6 class CurrentService(PerServiceBase, Source):
7         def __init__(self, navcore):
8                 Source.__init__(self)
9                 PerServiceBase.__init__(self, navcore, 
10                         { 
11                                 iPlayableService.evStart: self.serviceEvent,
12                                 iPlayableService.evEnd: self.serviceEvent,
13                                 # FIXME: we should check 'interesting_events'
14                                 # which is not always provided.
15                                 iPlayableService.evUpdatedInfo: self.serviceEvent,
16                                 iPlayableService.evUpdatedEventInfo: self.serviceEvent,
17                                 iPlayableService.evCuesheetChanged: self.serviceEvent,
18                                 iPlayableService.evVideoSizeChanged: self.serviceEvent
19                         }, with_event=True)
20                 self.navcore = navcore
21
22         def serviceEvent(self, event):
23                 self.changed((self.CHANGED_SPECIFIC, event))
24
25         @cached
26         def getCurrentService(self):
27                 return self.navcore.getCurrentService()
28
29         service = property(getCurrentService)