* Plugins:

- Auto-update plugins after a router update
    - Add update-all button
This commit is contained in:
zzz
2012-01-15 21:15:08 +00:00
parent 9acabfb20f
commit fc6f4ecc74
6 changed files with 141 additions and 5 deletions

View File

@ -53,6 +53,10 @@ public class ConfigClientsHandler extends FormHandler {
installPlugin();
return;
}
if (_action.equals(_("Update All Installed Plugins"))) {
updateAllPlugins();
return;
}
// value
if (_action.startsWith("Start ")) {
String app = _action.substring(6);
@ -321,6 +325,16 @@ public class ConfigClientsHandler extends FormHandler {
installPlugin(url);
}
/** @since 0.8.13 */
private void updateAllPlugins() {
addFormNotice(_("Updating all plugins"));
PluginStarter.updateAll(_context);
// So that update() will post a status to the summary bar before we reload
try {
Thread.sleep(1000);
} catch (InterruptedException ie) {}
}
private void installPlugin(String url) {
if ("true".equals(System.getProperty(UpdateHandler.PROP_UPDATE_IN_PROGRESS))) {
addFormError(_("Plugin or update download already in progress."));