- Fix spacing in summary bar

- Add start() in UpdateTask so things happen in the right order
- Add toString() in UpdateTask for better debugging
- Fix getID() for plugin UpdateTasks
This commit is contained in:
zzz
2012-10-22 20:25:01 +00:00
parent 1538e6ec4e
commit bd9ad9982b
12 changed files with 35 additions and 13 deletions

View File

@ -47,7 +47,6 @@ class UpdateHandler implements Updater {
return null;
UpdateRunner update = new UpdateRunner(_context, _umgr, _smgr, updateSources, newVersion);
_umgr.notifyProgress(update, "<b>" + _smgr.util().getString("Updating") + "</b>");
update.start();
return update;
}
}

View File

@ -77,11 +77,6 @@ class UpdateRunner implements UpdateTask, CompleteListener {
* If it is, get the whole thing.
*/
private void update() {
if (_urls.isEmpty()) {
_umgr.notifyTaskFailed(this, "", null);
return;
}
for (URI uri : _urls) {
_currentURI = uri;
String updateURL = uri.toString();
@ -102,7 +97,9 @@ class UpdateRunner implements UpdateTask, CompleteListener {
new Timeout();
break;
}
} catch (IllegalArgumentException iae) {}
} catch (IllegalArgumentException iae) {
_log.error("Invalid update URL", iae);
}
}
if (_snark == null)
fatal("No valid URLs");
@ -232,4 +229,9 @@ class UpdateRunner implements UpdateTask, CompleteListener {
private void updateStatus(String s) {
_umgr.notifyProgress(this, s);
}
@Override
public String toString() {
return getClass().getName() + ' ' + getType() + ' ' + getID() + ' ' + getMethod() + ' ' + getURI();
}
}