Config config = _app.init(true);
if (preloads) doPredownloads(_app.getResources());
_ifc = new Application.UpdateInterface(config);
- _status.setAppbase(_app.getAppbase());
+ if (_status != null) {
+ _status.setAppbase(_app.getAppbase());
+ }
}
/**
// show the patch notes button, if applicable
if (!StringUtil.isBlank(_ifc.patchNotesUrl)) {
createInterfaceAsync(false);
- EventQueue.invokeLater(new Runnable() {
+ EQinvoke(new Runnable() {
public void run () {
_patchNotes.setVisible(true);
}
if (_silent || (_container != null && !reinit)) {
return;
}
-/*
- EventQueue.invokeLater(new Runnable() {
- public void run () {
-*/
- try {
- EventQueue.invokeAndWait(new Runnable() {
+
+ EQinvoke (new Runnable() {
public void run () {
if (_container == null || reinit) {
showContainer();
}
});
- } catch (Exception e) {
- e.printStackTrace();
- }
+
}
/**
createInterfaceAsync(false);
}
-/*
- EventQueue.invokeLater(new Runnable() {
- public void run () {
-*/
- try {
- EventQueue.invokeAndWait(new Runnable() {
+ EQinvoke(new Runnable() {
public void run () {
if (_status == null) {
}
}
});
- } catch (Exception e) {
- e.printStackTrace();
- }
}
protected void reportTrackingEvent (String event, int progress)
setStatusAsync(null, stepToGlobalPercent(percent), -1L, false);
}
};
+
+ // Asynchronous or synchronous progress updates
+ protected void EQinvoke(Runnable r) {
+ try {
+ readConfig(false);
+ if (_ifc.progressSync) {
+ EventQueue.invokeAndWait(r);
+ } else {
+ EventQueue.invokeLater(r);
+ }
+ } catch (Exception e) {
+ EventQueue.invokeLater(r);
+ }
+ }
protected Application _app;
protected Application.UpdateInterface _ifc = new Application.UpdateInterface(Config.EMPTY);