From dfc3142e629d32e1f5efa380e777f711dc0fe92c Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Thu, 23 Feb 2006 00:22:33 +0000 Subject: [PATCH] update pluginlist after downloading a plugin --- lib/python/Screens/PluginBrowser.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/python/Screens/PluginBrowser.py b/lib/python/Screens/PluginBrowser.py index 67aac076..429163ee 100644 --- a/lib/python/Screens/PluginBrowser.py +++ b/lib/python/Screens/PluginBrowser.py @@ -11,6 +11,7 @@ from Components.Label import Label from Screens.MessageBox import MessageBox from Screens.Console import Console from Plugins.Plugin import PluginDescriptor +from Tools.Directories import resolveFilename, SCOPE_PLUGINS class PluginBrowser(Screen): def __init__(self, session): @@ -52,7 +53,7 @@ class PluginBrowser(Screen): pass def download(self): - self.session.open(PluginDownloadBrowser) + self.session.openWithCallback(self.updateList, PluginDownloadBrowser) class PluginDownloadBrowser(Screen): def __init__(self, session): @@ -83,12 +84,15 @@ class PluginDownloadBrowser(Screen): def runInstall(self, val): if val: - self.session.open(Console, ["ipkg install " + self.pluginlist[self["list"].l.getCurrentSelectionIndex()][0]]) + self.session.openWithCallback(self.installFinished, Console, ["ipkg install " + self.pluginlist[self["list"].l.getCurrentSelectionIndex()][0]]) def startRun(self): self["list"].instance.hide() self.container.execute("ipkg update") + def installFinished(self): + plugins.readPluginList(resolveFilename(SCOPE_PLUGINS)) + def runFinished(self, retval): if self.run == 0: self.run = 1 -- 2.30.2