aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-02-21 17:42:17 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-02-21 17:42:17 +0000
commit7319cb85c7a9a6304ac92a7854a5d79c9d9f115b (patch)
treea67f3c234e29bc1fb09f391bf3bb51d1d33ea5e1 /lib/python
parent004592ca6fef29ceae507deb49b9147322b65016 (diff)
downloadenigma2-7319cb85c7a9a6304ac92a7854a5d79c9d9f115b.tar.gz
enigma2-7319cb85c7a9a6304ac92a7854a5d79c9d9f115b.zip
display front processor version in about screen
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/About.py11
-rw-r--r--lib/python/Tools/DreamboxHardware.py7
-rw-r--r--lib/python/Tools/Makefile.am3
-rw-r--r--lib/python/Tools/__init__.py2
4 files changed, 20 insertions, 3 deletions
diff --git a/lib/python/Screens/About.py b/lib/python/Screens/About.py
index 5bd5f273..7e93aa0a 100644
--- a/lib/python/Screens/About.py
+++ b/lib/python/Screens/About.py
@@ -6,6 +6,8 @@ from Components.NimManager import nimmanager
from Components.MenuList import MenuList
from Components.About import about
+from Tools.DreamboxHardware import getFPVersion
+
class About(Screen):
def __init__(self, session):
Screen.__init__(self, session)
@@ -13,6 +15,14 @@ class About(Screen):
self["text"] = Label("Enigma v" + about.getVersionString())
self["tuner"] = Label(_("Detected NIMs:"))
+
+ fp_version = getFPVersion()
+ if fp_version is None:
+ fp_version = ""
+ else:
+ fp_version = _("Frontprocessor version: %d") % fp_version
+
+ self["fpVersion"] = Label(fp_version)
nims = nimmanager.nimList()
count = 0
@@ -32,4 +42,3 @@ class About(Screen):
"cancel": self.close,
"ok": self.close,
})
- \ No newline at end of file
diff --git a/lib/python/Tools/DreamboxHardware.py b/lib/python/Tools/DreamboxHardware.py
new file mode 100644
index 00000000..4f873e9e
--- /dev/null
+++ b/lib/python/Tools/DreamboxHardware.py
@@ -0,0 +1,7 @@
+def getFPVersion():
+ from fcntl import ioctl
+ try:
+ fp = open("/dev/dbox/fp0")
+ return ioctl(fp.fileno(),0)
+ except IOError:
+ return None
diff --git a/lib/python/Tools/Makefile.am b/lib/python/Tools/Makefile.am
index f1fc9368..a2160d8a 100644
--- a/lib/python/Tools/Makefile.am
+++ b/lib/python/Tools/Makefile.am
@@ -3,4 +3,5 @@ installdir = $(LIBDIR)/enigma2/python/Tools
install_DATA = \
FuzzyDate.py XMLTools.py Directories.py NumericalTextInput.py \
KeyBindings.py BoundFunction.py ISO639.py Notifications.py __init__.py \
- RedirectOutput.py
+ RedirectOutput.py DreamboxHardware.py
+
diff --git a/lib/python/Tools/__init__.py b/lib/python/Tools/__init__.py
index 16205a55..a79bb103 100644
--- a/lib/python/Tools/__init__.py
+++ b/lib/python/Tools/__init__.py
@@ -1,2 +1,2 @@
all = ["FuzzyDate.py", "XMLTools.py", "Directories.py", "KeyBindings.py", "BoundFunction.py", "ISO639.py", "Notifications",
- "RedirectOutput.py"]
+ "RedirectOutput.py", "DreamboxHardware.py"]