service: add sort of servicelist including all required layers
[enigma2.git] / lib / python / Components / ServiceName.py
1 from PerServiceDisplay import *
2
3 #from enigma import pNavigation, iServiceInformationPtr
4 from enigma import *
5
6 class ServiceName(PerServiceDisplay):
7         def __init__(self, navcore):
8                 PerServiceDisplay.__init__(self, navcore,
9                         {
10                                 pNavigation.evNewService: self.newService,
11                                 pNavigation.evStopService: self.stopEvent
12                         })
13
14         def newService(self):
15                 service = self.navcore.getCurrentService()
16                 
17                 print service
18                 
19                 if service is not None:
20                         info = service.info()
21                         if info is not None:
22                                 self.setText(info.getName())
23                                 setLCD(info.getName())
24         
25         def stopEvent(self):
26                         self.setText("");
27