use image-version from /etc/image-version as version in e2 about box
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 1 Jan 2006 20:37:05 +0000 (20:37 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 1 Jan 2006 20:37:05 +0000 (20:37 +0000)
lib/python/Components/About.py [new file with mode: 0644]
lib/python/Components/Makefile.am
lib/python/Screens/About.py

diff --git a/lib/python/Components/About.py b/lib/python/Components/About.py
new file mode 100644 (file)
index 0000000..24bfb2b
--- /dev/null
@@ -0,0 +1,17 @@
+from Tools.Directories import *
+
+class About:
+       def __init__(self):
+               pass
+       
+       def getVersionString(self):
+               file = open(resolveFilename(SCOPE_SYSETC, 'image-version'), 'r')
+               lines = file.readlines()
+               for x in lines:
+                       splitted = x.split('=')
+                       if splitted[0] == "version":
+                               return "2.0-" + str(splitted[1])
+               file.close()
+               return "2.0b"
+       
+about = About()
\ No newline at end of file
index 656527b..a5058cf 100644 (file)
@@ -11,4 +11,4 @@ install_PYTHON = \
        AVSwitch.py Network.py RFmod.py DiskInfo.py NimManager.py Lcd.py                                \
        EpgList.py ScrollLabel.py Timezones.py Language.py HelpMenuList.py \
        BlinkingPixmap.py Pixmap.py ConditionalWidget.py Slider.py LanguageList.py \
-       PluginList.py PluginComponent.py RecordingConfig.py
+       PluginList.py PluginComponent.py RecordingConfig.py About.py
index 2e267a0..5bd5f27 100644 (file)
@@ -4,12 +4,13 @@ from Components.Label import Label
 from Components.Harddisk import Harddisk
 from Components.NimManager import nimmanager
 from Components.MenuList import MenuList
+from Components.About import about
 
 class About(Screen):
        def __init__(self, session):
                Screen.__init__(self, session)
                
-               self["text"] = Label("Enigma v2.0b")
+               self["text"] = Label("Enigma v" + about.getVersionString())
 
                self["tuner"] = Label(_("Detected NIMs:"))