bed0275902eb64ee68e138561175d56a5d871ffa
[enigma2.git] / lib / python / Screens / About.py
1 from Screen import Screen
2 from Components.ActionMap import ActionMap
3 from Components.Label import Label
4 from Components.Harddisk import Harddisk
5 from Components.NimManager import nimmanager
6 from Components.MenuList import MenuList
7 from Components.About import about
8
9 from Tools.DreamboxHardware import getFPVersion
10
11 class About(Screen):
12         def __init__(self, session):
13                 Screen.__init__(self, session)
14                 
15                 self["text"] = Label("Enigma v" + about.getVersionString())
16
17                 self["tuner"] = Label(_("Detected NIMs:"))
18
19                 fp_version = getFPVersion()
20                 if fp_version is None:
21                         fp_version = ""
22                 else:
23                         fp_version = _("Frontprocessor version: %d") % fp_version
24                 
25                 self["fpVersion"] = Label(fp_version)
26                 
27                 nims = nimmanager.nimList()
28                 count = 0
29                 for i in nims:
30                         self["tuner" + str(count)] = Label(i[0])
31                         count += 1
32
33                 self["hdd"] = Label(_("Detected HDD:"))
34                 hdd = Harddisk(0)
35                 if hdd.model() != "":
36                         self["hddA"] = Label(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
37                 else:                   
38                         self["hddA"] = Label(_("none"))
39
40                 self["actions"] = ActionMap(["SetupActions"], 
41                         {
42                                 "cancel": self.close,
43                                 "ok": self.close,
44                         })