add icelandic language
[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                 for count in range(2):
29                         print "count:", nimmanager.nimCount
30                         if count < nimmanager.nimCount:
31                                 self["tuner" + str(count)] = Label(nims[count][0])
32                         else:
33                                 self["tuner" + str(count)] = Label("")
34
35                 self["hdd"] = Label(_("Detected HDD:"))
36                 hdd = Harddisk(0)
37                 if hdd.model() != "":
38                         self["hddA"] = Label(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
39                 else:                   
40                         self["hddA"] = Label(_("none"))
41
42                 self["actions"] = ActionMap(["SetupActions"], 
43                         {
44                                 "cancel": self.close,
45                                 "ok": self.close,
46                         })