Enigma2-Plugins: implement needsRestart=True for plugins that need a enigma2 restart...
authoracid-burn <acid-burn@opendreambox.org>
Mon, 7 Feb 2011 20:52:19 +0000 (21:52 +0100)
committeracid-burn <acid-burn@opendreambox.org>
Mon, 7 Feb 2011 20:52:19 +0000 (21:52 +0100)
refs #670

lib/python/Plugins/Extensions/DVDBurn/plugin.py [changed mode: 0644->0755]
lib/python/Plugins/Extensions/DVDPlayer/plugin.py
lib/python/Plugins/Extensions/MediaScanner/plugin.py
lib/python/Plugins/Extensions/Modem/plugin.py [changed mode: 0644->0755]
lib/python/Plugins/Extensions/SocketMMI/plugin.py [changed mode: 0644->0755]
lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/Hotplug/plugin.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index bd856b4..f5d2fa6
@@ -13,5 +13,5 @@ def main_add(session, service, **kwargs):
 
 def Plugins(**kwargs):
        descr = _("Burn to DVD")
-       return [PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_MOVIELIST, fnc=main_add, icon="dvdburn.png"),
-               PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main, icon="dvdburn.png") ]
+       return [PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_MOVIELIST, needsRestart = True, fnc=main_add, icon="dvdburn.png"),
+               PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = True, fnc=main, icon="dvdburn.png") ]
index e1ab3ef476d452a801876735c0b880b0cfcbe75e..eaf8db64c0ee3463afce1286dedf9c4485704e93 100755 (executable)
@@ -775,5 +775,5 @@ def filescan(**kwargs):
                )]              
 
 def Plugins(**kwargs):
-       return [PluginDescriptor(name = "DVDPlayer", description = "Play DVDs", where = PluginDescriptor.WHERE_MENU, fnc = menu),
-                       PluginDescriptor(where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)]
+       return [PluginDescriptor(name = "DVDPlayer", description = "Play DVDs", where = PluginDescriptor.WHERE_MENU, needsRestart = True, fnc = menu),
+                       PluginDescriptor(where = PluginDescriptor.WHERE_FILESCAN, needsRestart = True, fnc = filescan)]
index 0cefa3531e6be5d4b341e2818a73e2ffd09a4f43..76bbb26a92d91c514d28926db4383e95b626f80b 100755 (executable)
@@ -91,8 +91,8 @@ def autostart(reason, **kwargs):
 
 def Plugins(**kwargs):
        return [
-               PluginDescriptor(name="MediaScanner", description=_("Scan Files..."), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main),
+               PluginDescriptor(name="MediaScanner", description=_("Scan Files..."), where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = True, fnc=main),
 #              PluginDescriptor(where = PluginDescriptor.WHERE_MENU, fnc=menuHook),
-               PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart),
-               PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart)
+               PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = True, fnc = sessionstart),
+               PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = True, fnc = autostart)
                ]
old mode 100644 (file)
new mode 100755 (executable)
index e57e4f5..0b397c1
@@ -280,4 +280,4 @@ def main(session, **kwargs):
        session.open(ModemSetup)
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name="Modem", description="plugin to connect to internet via builtin modem", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
+       return PluginDescriptor(name="Modem", description="plugin to connect to internet via builtin modem", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=main)
old mode 100644 (file)
new mode 100755 (executable)
index 387c830..568cde2
@@ -22,6 +22,7 @@ def autostart(reason, **kwargs):
                socketHandler = SocketMMIMessageHandler()
 
 def Plugins(**kwargs):
-       return [ PluginDescriptor(name = "SocketMMI", description = _("Python frontend for /tmp/mmi.socket"), where = PluginDescriptor.WHERE_MENU, fnc = menu),
-               PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart),
-               PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart) ]
+       return [ PluginDescriptor(name = "SocketMMI", description = _("Python frontend for /tmp/mmi.socket"), where = PluginDescriptor.WHERE_MENU, needsRestart = True, fnc = menu),
+               PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = True, fnc = sessionstart),
+               PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = True, fnc = autostart) ]
+
old mode 100644 (file)
new mode 100755 (executable)
index 05085ea..e124ffd
@@ -17,7 +17,7 @@ def getPlugins():
                for x in dir:
                        if x[-3:] == "cfg":
                                params = getPluginParams(x)
-                               pluginlist.append(PluginDescriptor(name=params["name"], description=params["desc"], where = PluginDescriptor.WHERE_PLUGINMENU, icon="tuxbox.png", fnc=boundFunction(main, plugin=x)))
+                               pluginlist.append(PluginDescriptor(name=params["name"], description=params["desc"], where = PluginDescriptor.WHERE_PLUGINMENU, icon="tuxbox.png", needsRestart = True, fnc=boundFunction(main, plugin=x)))
        
        return pluginlist
 
old mode 100644 (file)
new mode 100755 (executable)
index 38b80c9..6cb30de
@@ -76,11 +76,11 @@ def Plugins(**kwargs):
        newversion = getUpgradeVersion() or 0
        list = []
        if version is not None and version < newversion:
-               list.append(PluginDescriptor(name="FP Upgrade", where = PluginDescriptor.WHERE_WIZARD, fnc=(8, FPUpgrade)))
+               list.append(PluginDescriptor(name="FP Upgrade", where = PluginDescriptor.WHERE_WIZARD, needsRestart = True, 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)))
+               list.append(PluginDescriptor(name="System Message Check", where = PluginDescriptor.WHERE_WIZARD, needsRestart = True, fnc=(9, SystemMessage, msg)))
        except:
                pass
 
old mode 100644 (file)
new mode 100755 (executable)
index 1f379f1..84cbbcb
@@ -297,4 +297,4 @@ def autostart(reason, **kwargs):
                        reactor.listenUNIX("/tmp/hotplug.socket", factory)
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name = "Hotplug", description = "listens to hotplug events", where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart)
+       return PluginDescriptor(name = "Hotplug", description = "listens to hotplug events", where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = True, fnc = autostart)