Merge remote branch 'origin/acid-burn/bug_670_plugin_restartoption'
authoracid-burn <acid-burn@opendreambox.org>
Fri, 11 Feb 2011 12:32:34 +0000 (13:32 +0100)
committeracid-burn <acid-burn@opendreambox.org>
Fri, 11 Feb 2011 12:32:34 +0000 (13:32 +0100)
34 files changed:
lib/python/Components/PluginComponent.py
lib/python/Plugins/DemoPlugins/TPMDemo/plugin.py
lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py
lib/python/Plugins/Extensions/CutListEditor/plugin.py
lib/python/Plugins/Extensions/DVDBurn/plugin.py
lib/python/Plugins/Extensions/DVDPlayer/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py
lib/python/Plugins/Extensions/MediaPlayer/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/Extensions/MediaScanner/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/Extensions/Modem/plugin.py
lib/python/Plugins/Extensions/PicturePlayer/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/Extensions/SocketMMI/plugin.py
lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py
lib/python/Plugins/Plugin.py
lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py
lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py
lib/python/Plugins/SystemPlugins/Hotplug/plugin.py
lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py
lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py
lib/python/Plugins/SystemPlugins/Satfinder/plugin.py
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/VideoEnhancement/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/VideoTune/plugin.py
lib/python/Plugins/SystemPlugins/Videomode/plugin.py [changed mode: 0755->0644]
lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py [changed mode: 0755->0644]

index 5e439fdfea437eb0402e121dbfdc40baea843825..0e178fff0790050f3338e4638106992339c9f628 100755 (executable)
@@ -8,6 +8,9 @@ from Plugins.Plugin import PluginDescriptor
 import keymapparser
 
 class PluginComponent:
+       firstRun = True
+       restartRequired = False
+       
        def __init__(self):
                self.plugins = {}
                self.pluginList = [ ]
@@ -18,12 +21,15 @@ class PluginComponent:
                self.prefix = prefix
 
        def addPlugin(self, plugin):
-               self.pluginList.append(plugin)
-               for x in plugin.where:
-                       self.plugins.setdefault(x, []).append(plugin)
-                       if x == PluginDescriptor.WHERE_AUTOSTART:
-                               plugin(reason=0)
-
+               if self.firstRun or plugin.needsRestart is False:
+                       self.pluginList.append(plugin)
+                       for x in plugin.where:
+                               self.plugins.setdefault(x, []).append(plugin)
+                               if x == PluginDescriptor.WHERE_AUTOSTART:
+                                       plugin(reason=0)
+               else:
+                       self.restartRequired = True
+                               
        def removePlugin(self, plugin):
                self.pluginList.remove(plugin)
                for x in plugin.where:
@@ -81,12 +87,21 @@ class PluginComponent:
                # internally, the "fnc" argument will be compared with __eq__
                plugins_added = [p for p in new_plugins if p not in self.pluginList]
                plugins_removed = [p for p in self.pluginList if not p.internal and p not in new_plugins]
+               
+               #ignore already installed but reloaded plugins
+               for p in plugins_removed: 
+                       for pa in plugins_added:
+                               if pa.name == p.name and pa.where == p.where:
+                                       pa.needsRestart = False
 
                for p in plugins_removed:
                        self.removePlugin(p)
 
                for p in plugins_added:
                        self.addPlugin(p)
+               
+               if self.firstRun:
+                       self.firstRun = False
 
        def getPlugins(self, where):
                """Get list of plugins in a specific category"""
index 2c078d3505ff8a864c83cb570512a4263b0f0f1f..dcaa1f65bb4fd6bc61914bb5b8bd01ddfd4a60b5 100644 (file)
@@ -82,6 +82,6 @@ def main(session, **kwargs):
                        # would start your plugin here
 
 def Plugins(**kwargs):
-       return [PluginDescriptor(name = "TPM Demo", description = _("A demo plugin for TPM usage."), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc = main),
-               PluginDescriptor(name = "TPM Demo", description = _("A demo plugin for TPM usage."), icon = "plugin.png", where = PluginDescriptor.WHERE_PLUGINMENU, fnc = main)]
+       return [PluginDescriptor(name = "TPM Demo", description = _("A demo plugin for TPM usage."), where = PluginDescriptor.WHERE_EXTENSIONSMENU, needsRestart = False, fnc = main),
+               PluginDescriptor(name = "TPM Demo", description = _("A demo plugin for TPM usage."), icon = "plugin.png", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc = main)]
        
\ No newline at end of file
index 69f935e4718b86ebd7eddf26e7d88ac927690e2c..4ef4a87df946811937da316af61aee1482514adf 100644 (file)
@@ -80,4 +80,4 @@ def test(returnValue):
        print "You entered", returnValue
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name="Test", description="plugin to test some capabilities", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
+       return PluginDescriptor(name="Test", description="plugin to test some capabilities", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=main)
index 0627df3b6a7c0f2f2df557f6e28c389101fcea18..141c04ac41f2f3f0bab61a17b6ce28285bf340be 100644 (file)
@@ -406,4 +406,4 @@ def main(session, service, **kwargs):
        session.open(CutListEditor, service)
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name="Cutlist Editor", description=_("Cutlist editor..."), where = PluginDescriptor.WHERE_MOVIELIST, fnc=main)
+       return PluginDescriptor(name="Cutlist Editor", description=_("Cutlist editor..."), where = PluginDescriptor.WHERE_MOVIELIST, needsRestart = False, fnc=main)
index bd856b4757985f36e7ab30f5056cc6605281e55d..f5d2fa6262c32d64c3aecbe8d2b04649ec02d98a 100644 (file)
@@ -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") ]
old mode 100755 (executable)
new mode 100644 (file)
index 1f3de1a..1cee0aa
@@ -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 adb7015dd8edda6e1b63d76b76c43e428faf821b..bcc7b9b261f245b24e6b356dba814e2d2220a58c 100644 (file)
@@ -94,5 +94,5 @@ def main(session, servicelist, **kwargs):
 def Plugins(**kwargs):
        name = _("Graphical Multi EPG")
        descr = _("A graphical EPG for all services of an specific bouquet")
-       return [ PluginDescriptor(name=name, description=descr, where = PluginDescriptor.WHERE_EVENTINFO, fnc=main),
-         PluginDescriptor(name=name, description=descr, where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main) ]
+       return [PluginDescriptor(name=name, description=descr, where = PluginDescriptor.WHERE_EVENTINFO, needsRestart = False, fnc=main),
+               PluginDescriptor(name=name, description=descr, where = PluginDescriptor.WHERE_EXTENSIONSMENU, needsRestart = False, fnc=main)]
old mode 100755 (executable)
new mode 100644 (file)
index 9ae886f..b44a247
@@ -1041,6 +1041,6 @@ def filescan(**kwargs):
 from Plugins.Plugin import PluginDescriptor
 def Plugins(**kwargs):
        return [
-               PluginDescriptor(name = "MediaPlayer", description = "Play back media files", where = PluginDescriptor.WHERE_MENU, fnc = menu),
-               PluginDescriptor(name = "MediaPlayer", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)
+               PluginDescriptor(name = "MediaPlayer", description = "Play back media files", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc = menu),
+               PluginDescriptor(name = "MediaPlayer", where = PluginDescriptor.WHERE_FILESCAN, needsRestart = False, fnc = filescan)
        ]
old mode 100755 (executable)
new mode 100644 (file)
index 0cefa35..76bbb26
@@ -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)
                ]
index e57e4f5140d81fc238a59e3234e8d716ce15babc..0b397c18da8804a025f0a5ab5aaf2e90ccd0aa78 100644 (file)
@@ -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 100755 (executable)
new mode 100644 (file)
index 5d1c2cb..169a8c8
@@ -625,5 +625,5 @@ def filescan(**kwargs):
 
 def Plugins(**kwargs):
        return \
-               [PluginDescriptor(name=_("PicturePlayer"), description=_("fileformats (BMP, PNG, JPG, GIF)"), icon="pictureplayer.png", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main),
-                PluginDescriptor(name=_("PicturePlayer"), where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)]
+               [PluginDescriptor(name=_("PicturePlayer"), description=_("fileformats (BMP, PNG, JPG, GIF)"), icon="pictureplayer.png", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=main),
+                PluginDescriptor(name=_("PicturePlayer"), where = PluginDescriptor.WHERE_FILESCAN, needsRestart = False, fnc = filescan)]
index 387c8306d7d8ecd391e85924cf1ede2bbaaefc5d..568cde2ac876451472471c821914dfc0f23fea0e 100644 (file)
@@ -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) ]
+
index 05085ead2c42ccd004566404b88cb66b6fd8f96a..e124ffd2d2cfed365c2bc167caf37e2a44e0b689 100644 (file)
@@ -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
 
index 5a676cdadaf4ca8bfd2c5675f3bea90b81e11c80..9ecdbc26de3af3420ea47e8c7ac947ba239cf58a 100755 (executable)
@@ -61,9 +61,10 @@ class PluginDescriptor:
        WHERE_SOFTWAREMANAGER = 14
 
 
-       def __init__(self, name = "Plugin", where = [ ], description = "", icon = None, fnc = None, wakeupfnc = None, internal = False):
+       def __init__(self, name = "Plugin", where = [ ], description = "", icon = None, fnc = None, wakeupfnc = None, needsRestart = None, internal = False):
                self.name = name
                self.internal = internal
+               self.needsRestart = needsRestart
                if isinstance(where, list):
                        self.where = where
                else:
old mode 100755 (executable)
new mode 100644 (file)
index f8677bb..157aa75
@@ -126,10 +126,10 @@ def selSetup(menuid, **kwargs):
 
 def Plugins(**kwargs):
        list = []
-       list.append(PluginDescriptor(name=_("CleanupWizard"), description=_("Cleanup Wizard settings"),where=PluginDescriptor.WHERE_MENU, fnc=selSetup))
+       list.append(PluginDescriptor(name=_("CleanupWizard"), description=_("Cleanup Wizard settings"),where=PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=selSetup))
        if config.plugins.cleanupwizard.enable.value:
                if not config.misc.firstrun.value:
                        if internalMemoryExceeded:
-                               list.append(PluginDescriptor(name=_("Cleanup Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(1, CleanupWizard)))
+                               list.append(PluginDescriptor(name=_("Cleanup Wizard"), where = PluginDescriptor.WHERE_WIZARD, needsRestart = False, fnc=(1, CleanupWizard)))
        return list
 
old mode 100755 (executable)
new mode 100644 (file)
index 52296c6..b345428
@@ -636,10 +636,10 @@ def menu(menuid, **kwargs):
 
 def Plugins(**kwargs):
        if config.usage.setup_level.index > 1:
-               return [PluginDescriptor( where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart ),
-                               PluginDescriptor( where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart ),
-                               PluginDescriptor( name = "CommonInterfaceAssignment", description = _("a gui to assign services/providers/caids to common interface modules"), where = PluginDescriptor.WHERE_MENU, fnc = menu )]
+               return [PluginDescriptor( where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = False, fnc = sessionstart ),
+                               PluginDescriptor( where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = False, fnc = autostart ),
+                               PluginDescriptor( name = "CommonInterfaceAssignment", description = _("a gui to assign services/providers/caids to common interface modules"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc = menu )]
        else:
-               return [PluginDescriptor( where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart ),
-                               PluginDescriptor( where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart ),
-                               PluginDescriptor( name = "CommonInterfaceAssignment", description = _("a gui to assign services/providers to common interface modules"), where = PluginDescriptor.WHERE_MENU, fnc = menu )]
+               return [PluginDescriptor( where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = False, fnc = sessionstart ),
+                               PluginDescriptor( where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = False, fnc = autostart ),
+                               PluginDescriptor( name = "CommonInterfaceAssignment", description = _("a gui to assign services/providers to common interface modules"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc = menu )]
old mode 100755 (executable)
new mode 100644 (file)
index 92c1628..ab74de4
@@ -421,6 +421,6 @@ def selSetup(menuid, **kwargs):
 
 
 def Plugins(**kwargs):
-       return [PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart),
-               PluginDescriptor(name=_("CrashlogAutoSubmit"), description=_("CrashlogAutoSubmit settings"),where=PluginDescriptor.WHERE_MENU, fnc=selSetup)]
+       return [PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], needsRestart = False, fnc = autostart),
+               PluginDescriptor(name=_("CrashlogAutoSubmit"), description=_("CrashlogAutoSubmit settings"),where=PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=selSetup)]
 
index 4d0a992d8866babe2e5d3bf85f0b96985712ce34..d26881edd332d1d8dde9b88b6f194677062ca704 100644 (file)
@@ -134,4 +134,4 @@ def DefaultServicesScannerMain(session, **kwargs):
        session.open(DefaultServicesScannerPlugin)
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name="Default Services Scanner", description=_("Scans default lamedbs sorted by satellite with a connected dish positioner"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=DefaultServicesScannerMain)
+       return PluginDescriptor(name="Default Services Scanner", description=_("Scans default lamedbs sorted by satellite with a connected dish positioner"), where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=DefaultServicesScannerMain)
old mode 100755 (executable)
new mode 100644 (file)
index 5b7edcf..4dcf6c6
@@ -679,5 +679,5 @@ def autostart(reason, **kwargs):
        resourcemanager.addResource("DiseqcTester", DiseqcTesterMain)
 
 def Plugins(**kwargs):
-       return [ PluginDescriptor(name="DiSEqC Tester", description=_("Test DiSEqC settings"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=DiseqcTesterMain),
-                       PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart)]
+       return [ PluginDescriptor(name="DiSEqC Tester", description=_("Test DiSEqC settings"), where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=DiseqcTesterMain),
+                       PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = False, fnc = autostart)]
index 38b80c95c84d35a722d3addad77f2097a4c27ce5..6cb30de21dd3e6ace6a726b348eb02eb1727a8f8 100644 (file)
@@ -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
 
index 1f379f10f495c99ef9b28bc1b6ee7f1c970a2f17..84cbbcb62d605790db46280ec427e6f9c41abe1c 100644 (file)
@@ -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)
old mode 100755 (executable)
new mode 100644 (file)
index 1eba1dd..b654476
@@ -20,6 +20,7 @@ def Plugins(**kwargs):
                description=_("Download .NFI-Files for USB-Flasher"),
                icon = "flash.png",
                where = PluginDescriptor.WHERE_SOFTWAREMANAGER,
+               needsRestart = False,
                fnc={"SoftwareSupported": NFICallFnc, "menuEntryName": lambda x: _("NFI Image Flashing"),
                        "menuEntryDescription": lambda x: _("Download .NFI-Files for USB-Flasher")}),
-               PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)]
+               PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, needsRestart = False, fnc = filescan)]
old mode 100755 (executable)
new mode 100644 (file)
index 49ec7da..56cebdb
@@ -18,5 +18,5 @@ def NetworkWizard(*args, **kwargs):
 def Plugins(**kwargs):
        list = []
        if config.misc.firstrun.value:
-               list.append(PluginDescriptor(name=_("Network Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(25, NetworkWizard)))
+               list.append(PluginDescriptor(name=_("Network Wizard"), where = PluginDescriptor.WHERE_WIZARD, needsRestart = False, fnc=(25, NetworkWizard)))
        return list
index 3cc9e75109b6fc5a041cedd4d10f17139e5542a9..be246db2db0c189bb63da48ff8995ecec5459702 100644 (file)
@@ -608,6 +608,6 @@ def PositionerSetupStart(menuid, **kwargs):
 
 def Plugins(**kwargs):
        if (nimmanager.hasNimType("DVB-S")):
-               return PluginDescriptor(name=_("Positioner setup"), description="Setup your positioner", where = PluginDescriptor.WHERE_MENU, fnc=PositionerSetupStart)
+               return PluginDescriptor(name=_("Positioner setup"), description="Setup your positioner", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=PositionerSetupStart)
        else:
                return []
index ec472e72f156e1b080df244c7d22ab773ecbc5ca..3a8c75c0ac85b72c9fd0a3b59cf2bf9275a72252 100644 (file)
@@ -71,6 +71,6 @@ def SecSetupStart(menuid):
 
 def Plugins(**kwargs):
        if (nimmgr.hasNimType("DVB-S")):
-               return PluginDescriptor(name=_("Satellite Equipment Setup"), description="Setup your satellite equipment", where = PluginDescriptor.WHERE_MENU, fnc=SecSetupStart)
+               return PluginDescriptor(name=_("Satellite Equipment Setup"), description="Setup your satellite equipment", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=SecSetupStart)
        else:
                return []
index d4fe6b58d5d5f89c015e3e04d1a81e1e6c47194f..e737466a1677cc637411d713e7c4d4dfb757c241 100644 (file)
@@ -276,6 +276,6 @@ def SatfinderStart(menuid, **kwargs):
 
 def Plugins(**kwargs):
        if (nimmanager.hasNimType("DVB-S")):
-               return PluginDescriptor(name=_("Satfinder"), description="Helps setting up your dish", where = PluginDescriptor.WHERE_MENU, fnc=SatfinderStart)
+               return PluginDescriptor(name=_("Satfinder"), description="Helps setting up your dish", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=SatfinderStart)
        else:
                return []
old mode 100755 (executable)
new mode 100644 (file)
index 30cbb6b..fd2b5e1
@@ -131,4 +131,4 @@ def SkinSelSetup(menuid, **kwargs):
                return []
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name="Skinselector", description="Select Your Skin", where = PluginDescriptor.WHERE_MENU, fnc=SkinSelSetup)
+       return PluginDescriptor(name="Skinselector", description="Select Your Skin", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=SkinSelSetup)
index 8b8fc97c4fcfaa698d05d5528b6f50d304c53a3d..87f0a4d6e11b5d7ac7f6a6d7ea7ae105dedc0303 100755 (executable)
@@ -264,13 +264,12 @@ class SoftwareTools(DreamInfoHandler):
                                                callback(False)
 
        def startIpkgListInstalled(self, callback = None):
-               print "STARTIPKGLISTINSTALLED"
                if callback is not None:
                        self.list_updating = True
                if self.list_updating:
                        if not self.UpdateConsole:
                                self.UpdateConsole = Console()
-                       cmd = "opkg list_installed"
+                       cmd = "opkg list-installed"
                        self.UpdateConsole.ePopen(cmd, self.IpkgListInstalledCB, callback)
 
        def IpkgListInstalledCB(self, result, retval, extra_args = None):
@@ -344,6 +343,7 @@ class SoftwareTools(DreamInfoHandler):
                                                callback = None
 
        def cleanupSoftwareTools(self):
+               self.list_updating = False
                if self.NotifierCallback is not None:
                        self.NotifierCallback = None
                self.ipkg.stop()
old mode 100755 (executable)
new mode 100644 (file)
index 480707d..b3a0a17
@@ -809,6 +809,8 @@ class PluginManager(Screen, DreamInfoHandler):
                                name = x[0].strip()
                                details = x[1].strip()
                                description = x[2].strip()
+                               if description == "":
+                                       description = "No description available."
                                packagename = x[3].strip()
                                selectState = self.getSelectionState(details)
                                if iSoftwareTools.installed_packetlist.has_key(packagename):
@@ -921,17 +923,20 @@ class PluginManager(Screen, DreamInfoHandler):
                        self.close()
 
        def runExecuteFinished(self):
-               self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
-
-       def ExecuteReboot(self, result):
-               if result is None:
-                       return
-               if result is False:
-                       self.reloadPluginlist()
+               self.reloadPluginlist()
+               restartRequired = plugins.restartRequired
+               if restartRequired:
+                       self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+               else:
                        self.selectedFiles = []
                        self.detailsClosed(True)
+
+       def ExecuteReboot(self, result):
                if result:
                        quitMainloop(3)
+               else:
+                       self.selectedFiles = []
+                       self.detailsClosed(True)
 
        def reloadPluginlist(self):
                plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
@@ -1287,30 +1292,24 @@ class PluginDetails(Screen, DreamInfoHandler):
                        self.session.openWithCallback(self.runUpgradeFinished, Ipkg, cmdList = self.cmdList)
 
        def runUpgradeFinished(self):
-               self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
-
-       def UpgradeReboot(self, result):
-               if result is None:
-                       return
-               if result is False:
+               self.reloadPluginlist()
+               restartRequired = plugins.restartRequired
+               if restartRequired:
+                       self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+               else:
                        self.close(True)
+       def UpgradeReboot(self, result):
                if result:
                        quitMainloop(3)
+               else:
+                       self.close(True)
 
        def runRemove(self, result):
                if result:
                        self.session.openWithCallback(self.runRemoveFinished, Ipkg, cmdList = self.cmdList)
 
        def runRemoveFinished(self):
-               self.session.openWithCallback(self.RemoveReboot, MessageBox, _("Remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
-
-       def RemoveReboot(self, result):
-               if result is None:
-                       return
-               if result is False:
-                       self.close(True)
-               if result:
-                       quitMainloop(3)
+               self.close(True)
 
        def reloadPluginlist(self):
                plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
@@ -1884,7 +1883,7 @@ class PacketManager(Screen, NumericalTextInput):
 
                if not self.Console:
                        self.Console = Console()
-               cmd = "opkg list_installed"
+               cmd = "opkg list-installed"
                self.Console.ePopen(cmd, self.IpkgListInstalled_Finished)
 
        def IpkgListInstalled_Finished(self, result, retval, extra_args = None):
@@ -1916,6 +1915,8 @@ class PacketManager(Screen, NumericalTextInput):
        
        def buildEntryComponent(self, name, version, description, state):
                divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png"))
+               if description == "":
+                       description = "No description available."
                if state == 'installed':
                        installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png"))
                        return((name, version, _(description), state, installedpng, divpng))    
@@ -2032,9 +2033,9 @@ def Plugins(path, **kwargs):
        global plugin_path
        plugin_path = path
        list = [
-               PluginDescriptor(name=_("Software management"), description=_("Manage your receiver's software"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup),
-               PluginDescriptor(name=_("Ipkg"), where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)
+               PluginDescriptor(name=_("Software management"), description=_("Manage your receiver's software"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=startSetup),
+               PluginDescriptor(name=_("Ipkg"), where = PluginDescriptor.WHERE_FILESCAN, needsRestart = False, fnc = filescan)
        ]
        if config.usage.setup_level.index >= 2: # expert+
-               list.append(PluginDescriptor(name=_("Software management"), description=_("Manage your receiver's software"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=UpgradeMain))
+               list.append(PluginDescriptor(name=_("Software management"), description=_("Manage your receiver's software"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, needsRestart = False, fnc=UpgradeMain))
        return list
old mode 100755 (executable)
new mode 100644 (file)
index 42fe82d..48f871f
@@ -166,5 +166,5 @@ def startMenu(menuid):
        return [(_("Temperature and Fan control"), main, "tempfancontrol", 80)]
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name = "Temperature and Fan control", description = _("Temperature and Fan control"), where = PluginDescriptor.WHERE_MENU, fnc = startMenu)
+       return PluginDescriptor(name = "Temperature and Fan control", description = _("Temperature and Fan control"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc = startMenu)
 
old mode 100755 (executable)
new mode 100644 (file)
index 7953d38..cde3930
@@ -394,5 +394,5 @@ def startSetup(menuid):
 def Plugins(**kwargs):
        list = []
        if config.usage.setup_level.index >= 2 and os_path.exists("/proc/stb/vmpeg/0/pep_apply"):
-               list.append(PluginDescriptor(name=_("Videoenhancement Setup"), description=_("Advanced Video Enhancement Setup"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup))
+               list.append(PluginDescriptor(name=_("Videoenhancement Setup"), description=_("Advanced Video Enhancement Setup"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=startSetup))
        return list
index 1b62206fbf0603b9ecaef369e1688dc6622f0500..9e90c72e61a722dd644b60478e69c62fe52bbcf8 100644 (file)
@@ -34,6 +34,6 @@ def startSetup(menuid):
 
 def Plugins(**kwargs):
        return [
-               PluginDescriptor(name=_("Video Fine-Tuning"), description=_("fine-tune your display"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup),
-               PluginDescriptor(name=_("Video Fine-Tuning Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(1, videoFinetuneWizard))
+               PluginDescriptor(name=_("Video Fine-Tuning"), description=_("fine-tune your display"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=startSetup),
+               PluginDescriptor(name=_("Video Fine-Tuning Wizard"), where = PluginDescriptor.WHERE_WIZARD, needsRestart = False, fnc=(1, videoFinetuneWizard))
        ]
old mode 100755 (executable)
new mode 100644 (file)
index 39c1131..7396534
@@ -227,8 +227,8 @@ def VideoWizard(*args, **kwargs):
 def Plugins(**kwargs):
        list = [
 #              PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart),
-               PluginDescriptor(name=_("Video Setup"), description=_("Advanced Video Setup"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup) 
+               PluginDescriptor(name=_("Video Setup"), description=_("Advanced Video Setup"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=startSetup) 
        ]
        if config.misc.videowizardenabled.value:
-               list.append(PluginDescriptor(name=_("Video Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(0, VideoWizard)))
+               list.append(PluginDescriptor(name=_("Video Wizard"), where = PluginDescriptor.WHERE_WIZARD, needsRestart = False, fnc=(0, VideoWizard)))
        return list
old mode 100755 (executable)
new mode 100644 (file)
index a13c797..adf47f0
@@ -463,4 +463,4 @@ def configStrings(iface):
                        return '        pre-up iwconfig '+iface+' essid "'+config.plugins.wlan.essid.value+'"\n pre-up /usr/sbin/wpa_supplicant -i'+iface+' -c/etc/wpa_supplicant.conf -B -dd -D'+driver+'\n    post-down wpa_cli terminate'
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name=_("Wireless LAN"), description=_("Connect to a Wireless Network"), where = PluginDescriptor.WHERE_NETWORKSETUP, fnc={"ifaceSupported": callFunction, "configStrings": configStrings, "WlanPluginEntry": lambda x: "Wireless Network Configuartion..."})
+       return PluginDescriptor(name=_("Wireless LAN"), description=_("Connect to a Wireless Network"), where = PluginDescriptor.WHERE_NETWORKSETUP, needsRestart = False, fnc={"ifaceSupported": callFunction, "configStrings": configStrings, "WlanPluginEntry": lambda x: "Wireless Network Configuartion..."})