X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/5a6713898cddeded5fc88d7316861d88400f57f1..fac0559ae32f4acaa6e02f4d05e44979715b4903:/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py diff --git a/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py b/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py index 67501b17..38b80c95 100644 --- a/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py +++ b/lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py @@ -47,11 +47,41 @@ class FPUpgrade(Screen): def ok(self): self.close(4) +class SystemMessage(Screen): + skin = """ + + + + """ + def __init__(self, session, message): + from Components.Sources.StaticText import StaticText + + Screen.__init__(self, session) + + self["text"] = StaticText(message) + + self["actions"] = ActionMap(["OkCancelActions"], + { + "cancel": self.ok, + }) + + def ok(self): + self.close() + def Plugins(**kwargs): from Tools.DreamboxHardware import getFPVersion + from Screens.MessageBox import MessageBox + version = getFPVersion() newversion = getUpgradeVersion() or 0 + list = [] if version is not None and version < newversion: - return PluginDescriptor(name="FP Upgrade", where = PluginDescriptor.WHERE_WIZARD, fnc=(8, FPUpgrade)) - else: - return [ ] + list.append(PluginDescriptor(name="FP Upgrade", where = PluginDescriptor.WHERE_WIZARD, fnc=(8, FPUpgrade))) + + try: + msg = open("/proc/stb/message").read() + list.append(PluginDescriptor(name="System Message Check", where = PluginDescriptor.WHERE_WIZARD, fnc=(9, SystemMessage, msg))) + except: + pass + + return list