some changes
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 23 Feb 2006 02:21:03 +0000 (02:21 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 23 Feb 2006 02:21:03 +0000 (02:21 +0000)
lib/python/Components/PluginComponent.py
lib/python/Screens/PluginBrowser.py

index ae06d7768a41062ab1dd24009335cefae326c6ac..f3cd7e1e22302aee0a0fd1051db7a3d4ea54f1e8 100644 (file)
@@ -59,6 +59,7 @@ class PluginComponent:
                                                p.updateIcon(path)
                                                self.addPlugin(p);
                                else:
                                                p.updateIcon(path)
                                                self.addPlugin(p);
                                else:
+                                       open(path + "__init__.py", "w").close()
                                        self.readPluginList(path, modules + [x], depth - 1)
 
        def getPlugins(self, where):
                                        self.readPluginList(path, modules + [x], depth - 1)
 
        def getPlugins(self, where):
@@ -71,6 +72,9 @@ class PluginComponent:
                        for p in self.plugins.get(x, [ ]):
                                res.append(p)
                return res
                        for p in self.plugins.get(x, [ ]):
                                res.append(p)
                return res
+       
+       def clearPluginList(self):
+               self.pluginList = []
 
        def shutdown(self):
                for p in self.pluginList[:]:
 
        def shutdown(self):
                for p in self.pluginList[:]:
index e40dc8a6d484827e41e1f3a8f3b0321193e37a96..75599c2bf922d3613abc842e9c9caedd78988817 100644 (file)
@@ -112,7 +112,9 @@ class PluginDownloadBrowser(Screen):
                self.container.execute("ipkg update")
                
        def installFinished(self):
                self.container.execute("ipkg update")
                
        def installFinished(self):
+               plugins.clearPluginList()
                plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
                plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
+               self.close()
                
        def runFinished(self, retval):
                if self.run == 0:
                
        def runFinished(self, retval):
                if self.run == 0:
@@ -137,6 +139,7 @@ class PluginDownloadBrowser(Screen):
                                self.pluginlist.append(plugin)
        
        def updateList(self):
                                self.pluginlist.append(plugin)
        
        def updateList(self):
+               self.list = []
                for x in self.pluginlist:
                        plugin = PluginDescriptor(name = x[3], description = x[2])
                        self.list.append(PluginEntryComponent(plugin))
                for x in self.pluginlist:
                        plugin = PluginDescriptor(name = x[3], description = x[2])
                        self.list.append(PluginEntryComponent(plugin))