convert About screen to source/renderer system. Change names a bit, add enigma versio...
authorFelix Domke <tmbinc@elitedvb.net>
Fri, 26 Oct 2007 17:00:29 +0000 (17:00 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Fri, 26 Oct 2007 17:00:29 +0000 (17:00 +0000)
data/skin_default.xml
lib/python/Screens/About.py

index f80e637..bdc64a3 100644 (file)
@@ -2,15 +2,16 @@
        <!-- Screwed Stone II skin (skin_default.xml) /Nemesis -->
        <!-- About screen -->
        <screen name="About" position="180,123" size="360,340" title="About" >
        <!-- Screwed Stone II skin (skin_default.xml) /Nemesis -->
        <!-- About screen -->
        <screen name="About" position="180,123" size="360,340" title="About" >
-               <widget name="text" position="10,30" size="340,20" font="Regular;18"/>
-               <widget name="fpVersion" position="10,50" size="340,20" font="Regular;18"/>
-               <widget name="tuner" position="10,90" size="340,20" font="Regular;18"/>
-               <widget name="tuner0" position="10,110" size="340,20" font="Regular;18"/>
-               <widget name="tuner1" position="10,130" size="340,20" font="Regular;18"/>
-               <widget name="tuner2" position="10,150" size="340,20" font="Regular;18"/>
-               <widget name="tuner3" position="10,170" size="340,20" font="Regular;18"/>
-               <widget name="hdd" position="10,210" size="340,20" font="Regular;18"/>
-               <widget name="hddA" position="10,230" size="340,40" font="Regular;18"/>
+               <widget source="EnigmaVersion" render="Label" position="10,30" size="340,20" font="Regular;18"/>
+               <widget source="ImageVersion" render="Label" position="10,50" size="340,20" font="Regular;18"/>
+               <widget source="FPVersion" render="Label" position="10,90" size="340,20" font="Regular;18"/>
+               <widget source="TunerHeader" render="Label" position="10,110" size="340,20" font="Regular;18"/>
+               <widget source="Tuner0" render="Label" position="10,130" size="340,20" font="Regular;18"/>
+               <widget source="Tuner1" render="Label" position="10,150" size="340,20" font="Regular;18"/>
+               <widget source="Tuner2" render="Label" position="10,170" size="340,20" font="Regular;18"/>
+               <widget source="Tuner3" render="Label" position="10,190" size="340,20" font="Regular;18"/>
+               <widget source="HDDHeader" render="Label" position="10,210" size="340,20" font="Regular;18"/>
+               <widget source="hddA" render="Label" position="10,230" size="340,40" font="Regular;18"/>
                <ePixmap pixmap="skin_default/dmm_logo.png" position="250,285" zPosition="1" size="98,53" alphatest="on" />
        </screen>
        <!-- Adapter setup -->
                <ePixmap pixmap="skin_default/dmm_logo.png" position="250,285" zPosition="1" size="98,53" alphatest="on" />
        </screen>
        <!-- Adapter setup -->
index 2c7d98f..03fbd10 100644 (file)
@@ -1,6 +1,7 @@
 from Screen import Screen
 from Components.ActionMap import ActionMap
 from Screen import Screen
 from Components.ActionMap import ActionMap
-from Components.Label import Label
+from Components.Sources.StaticText import StaticText
+from Components.Sources.Source import ObsoleteSource
 from Components.Harddisk import Harddisk
 from Components.NimManager import nimmanager
 from Components.About import about
 from Components.Harddisk import Harddisk
 from Components.NimManager import nimmanager
 from Components.About import about
@@ -10,32 +11,33 @@ from Tools.DreamboxHardware import getFPVersion
 class About(Screen):
        def __init__(self, session):
                Screen.__init__(self, session)
 class About(Screen):
        def __init__(self, session):
                Screen.__init__(self, session)
-               
-               self["text"] = Label("Enigma v" + about.getVersionString())
 
 
-               self["tuner"] = Label(_("Detected NIMs:"))
+               self["EnigmaVersion"] = StaticText("Enigma: " + about.getEnigmaVersionString())
+               self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())
+
+               self["TunerHeader"] = StaticText(_("Detected NIMs:"))
 
                fp_version = getFPVersion()
                if fp_version is None:
                        fp_version = ""
                else:
                        fp_version = _("Frontprocessor version: %d") % fp_version
 
                fp_version = getFPVersion()
                if fp_version is None:
                        fp_version = ""
                else:
                        fp_version = _("Frontprocessor version: %d") % fp_version
-               
-               self["fpVersion"] = Label(fp_version)
-               
+
+               self["FPVersion"] = StaticText(fp_version)
+
                nims = nimmanager.nimList()
                for count in range(4):
                        if count < len(nims):
                nims = nimmanager.nimList()
                for count in range(4):
                        if count < len(nims):
-                               self["tuner" + str(count)] = Label(nims[count])
+                               self["Tuner" + str(count)] = StaticText(nims[count])
                        else:
                        else:
-                               self["tuner" + str(count)] = Label("")
+                               self["Tuner" + str(count)] = StaticText("")
 
 
-               self["hdd"] = Label(_("Detected HDD:"))
+               self["HDDHeader"] = StaticText(_("Detected HDD:"))
                hdd = Harddisk(0)
                if hdd.model() != "":
                hdd = Harddisk(0)
                if hdd.model() != "":
-                       self["hddA"] = Label(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
+                       self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
                else:                   
                else:                   
-                       self["hddA"] = Label(_("none"))
+                       self["hddA"] = StaticText(_("none"))
 
                self["actions"] = ActionMap(["SetupActions"], 
                        {
 
                self["actions"] = ActionMap(["SetupActions"], 
                        {