|
@@ -57,7 +57,7 @@ import net.miginfocom.swing.MigLayout;
|
57
|
57
|
* The updater dialog informs the user of the new update that is available,
|
58
|
58
|
* and walks them through the process of downloading the update.
|
59
|
59
|
*/
|
60
|
|
-public final class SwingUpdaterDialog extends StandardDialog implements
|
|
60
|
+public class SwingUpdaterDialog extends StandardDialog implements
|
61
|
61
|
ActionListener, UpdateManagerListener {
|
62
|
62
|
|
63
|
63
|
/** Serial version UID. */
|
|
@@ -111,7 +111,7 @@ public final class SwingUpdaterDialog extends StandardDialog implements
|
111
|
111
|
header = new TextLabel("An update is available for one or more "
|
112
|
112
|
+ "components of DMDirc:");
|
113
|
113
|
|
114
|
|
- final List<UpdateComponent> updates = new ArrayList<UpdateComponent>();
|
|
114
|
+ final List<UpdateComponent> updates = new ArrayList<>();
|
115
|
115
|
for (UpdateComponent component : updateManager.getComponents()) {
|
116
|
116
|
if (updateManager.getStatus(component) != UpdateStatus.IDLE
|
117
|
117
|
&& updateManager.getStatus(component) != UpdateStatus.CHECKING_NOT_PERMITTED) {
|
|
@@ -222,6 +222,9 @@ public final class SwingUpdaterDialog extends StandardDialog implements
|
222
|
222
|
getOkButton().setEnabled(status != UpdateManagerStatus.WORKING);
|
223
|
223
|
|
224
|
224
|
if (status == UpdateManagerStatus.IDLE_RESTART_NEEDED) {
|
|
225
|
+ if (isVisible()) {
|
|
226
|
+ getController().showDialog(SwingRestartDialog.class);
|
|
227
|
+ }
|
225
|
228
|
dispose();
|
226
|
229
|
} else {
|
227
|
230
|
getCancelButton().setVisible(true);
|