- start on 'favourites' visual design. service listbox now configurable (in complex...
[enigma2.git] / lib / python / Components / ServiceName.py
1 from PerServiceDisplay import *
2
3 from enigma import pNavigation, iServiceInformationPtr
4
5 class ServiceName(PerServiceDisplay):
6         def __init__(self, navcore):
7                 PerServiceDisplay.__init__(self, navcore,
8                         {
9                                 pNavigation.evNewService: self.newService,
10                                 pNavigation.evStopService: self.stopEvent
11                         })
12
13         def newService(self):
14                 info = iServiceInformationPtr()
15                 service = self.navcore.getCurrentService()
16                 
17                 if service != None:
18                         if not service.info(info):
19                                 self.setText(info.getName())
20         
21         def stopEvent(self):
22                         self.setText("");
23