fix imports
[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.About import about
7
8 from Tools.DreamboxHardware import getFPVersion
9
10 class About(Screen):
11         def __init__(self, session):
12                 Screen.__init__(self, session)
13                 
14                 self["text"] = Label("Enigma v" + about.getVersionString())
15
16                 self["tuner"] = Label(_("Detected NIMs:"))
17
18                 fp_version = getFPVersion()
19                 if fp_version is None:
20                         fp_version = ""
21                 else:
22                         fp_version = _("Frontprocessor version: %d") % fp_version
23                 
24                 self["fpVersion"] = Label(fp_version)
25                 
26                 nims = nimmanager.nimList()
27                 for count in range(4):
28                         if count < len(nims):
29                                 self["tuner" + str(count)] = Label(nims[count])
30                         else:
31                                 self["tuner" + str(count)] = Label("")
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                         })