fix 'start'/'stop'/'select other' subtitles
[enigma2.git] / lib / python / Screens / ServiceInfo.py
index 7738e325754ae1b5f0d2de84c779c5dedc92c721..639b970a41fd32493b71110c90cfe5711369e1ae 100644 (file)
@@ -45,15 +45,12 @@ class ServiceInfoList(HTMLComponent, GUIComponent):
                self.l.setList(self.list)
                self.l.setFont(0, gFont("Regular", 23))
 
-       def GUIcreate(self, parent):
-               self.instance = eListbox(parent)
+       GUI_WIDGET = eListbox
+       
+       def postWidgetCreate(self, instance):
                self.instance.setContent(self.l)
                self.instance.setItemHeight(25)
 
-       def GUIdelete(self):
-               self.instance.setContent(None)
-               self.instance = None
-
 class ServiceInfo(Screen):
        def __init__(self, session):
                Screen.__init__(self, session)
@@ -71,16 +68,17 @@ class ServiceInfo(Screen):
                service = session.nav.getCurrentService()
                if service is not None:
                        self.info = service.info()
-                       self.feinfo = service.frontendStatusInfo()
-                       print self.info.getInfoObject(iServiceInformation.sVideoPID);
+                       self.feinfo = service.frontendInfo()
+                       print self.info.getInfoObject(iServiceInformation.sCAIDs);
                else:
                        self.info = None
+                       self.feinfo = None
 
 
-               self["red"] = Label("Serviceinfo")
-               self["green"] = Label("PIDs")
-               self["yellow"] = Label("Transponder")
-               self["blue"] = Label("Tuner status")
+               self["red"] = Label(_("Serviceinfo"))
+               self["green"] = Label(_("PIDs"))
+               self["yellow"] = Label(_("Transponder"))
+               self["blue"] = Label(_("Tuner status"))
        
                tlist = [ ]
 
@@ -109,22 +107,24 @@ class ServiceInfo(Screen):
                                   ("SID", self.getServiceInfoValue(iServiceInformation.sSID), TYPE_VALUE_HEX_DEC, 4))
                self.fillList(Labels)
        
-       def transponder(self):
-               frontendData = self.feinfo.getFrontendData(True)
+       def showFrontendData(self, real):
+               frontendData = self.feinfo and self.feinfo.getFrontendData(real)
                Labels = self.getFEData(frontendData)
                self.fillList(Labels)
+       
+       def transponder(self):
+               self.showFrontendData(True)
                
        def tuner(self):
-               frontendData = self.feinfo.getFrontendData(False)
-               Labels = self.getFEData(frontendData)
-               self.fillList(Labels)
+               self.showFrontendData(False)
                
        def getFEData(self, frontendData):
                if frontendData is None:
                        return []
                if frontendData["tuner_type"] == "DVB-S":
                        return ( ("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
-                                          ("Type", frontendData["tuner_type"], TYPE_TEXT),
+                                          ("Type", frontendData["system"], TYPE_TEXT),
+                                          ("Modulation", frontendData["modulation"], TYPE_TEXT),
                                           ("Orbital position", frontendData["orbital_position"], TYPE_VALUE_DEC),
                                           ("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
                                           ("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC),
@@ -159,7 +159,6 @@ class ServiceInfo(Screen):
                tlist = [ ]
 
                for item in Labels:
-                       print item
                        value = item[1]
                        if len(item) < 4:
                                tlist.append(ServiceInfoListEntry(item[0]+":", value, item[2]))