- split of Components into different files
[enigma2.git] / lib / python / Components / ServiceName.py
1 from PerServiceDisplay import *
2 from enigma import pNavigation
3
4 class ServiceName(PerServiceDisplay):
5         def __init__(self, navcore):
6                 PerServiceDisplay.__init__(self, navcore,
7                         {
8                                 pNavigation.evNewService: self.newService,
9                                 pNavigation.evStopService: self.stopEvent
10                         })
11
12         def newService(self):
13                 info = iServiceInformationPtr()
14                 service = self.navcore.getCurrentService(service)
15                 
16                 if service != None:
17                         if not service.info(info):
18                                 self.setText("no name known, but it should be here :)")
19         
20         def stopEvent(self):
21                         self.setText("");
22