From 1bd4065bcdb4c438f986e8ec0e19dfef9550d402 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sun, 1 Jan 2006 20:37:05 +0000 Subject: use image-version from /etc/image-version as version in e2 about box --- lib/python/Components/About.py | 17 +++++++++++++++++ lib/python/Components/Makefile.am | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 lib/python/Components/About.py (limited to 'lib/python/Components') diff --git a/lib/python/Components/About.py b/lib/python/Components/About.py new file mode 100644 index 00000000..24bfb2b0 --- /dev/null +++ b/lib/python/Components/About.py @@ -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 diff --git a/lib/python/Components/Makefile.am b/lib/python/Components/Makefile.am index 656527b2..a5058cf9 100644 --- a/lib/python/Components/Makefile.am +++ b/lib/python/Components/Makefile.am @@ -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 -- cgit v1.2.3