|
@@ -39,8 +39,10 @@ import com.dmdirc.addons.ui_swing.wizard.WizardDialog;
|
39
|
39
|
import com.dmdirc.addons.ui_swing.wizard.WizardListener;
|
40
|
40
|
import com.dmdirc.ui.IconManager;
|
41
|
41
|
import com.dmdirc.util.resourcemanager.ResourceManager;
|
|
42
|
+import java.awt.Dialog.ModalityType;
|
42
|
43
|
|
43
|
44
|
import java.awt.Dimension;
|
|
45
|
+import java.awt.Window;
|
44
|
46
|
import java.io.File;
|
45
|
47
|
import java.io.IOException;
|
46
|
48
|
import java.util.ArrayList;
|
|
@@ -56,22 +58,27 @@ public final class SwingFirstRunWizard implements WizardListener,
|
56
|
58
|
/** First run or update. */
|
57
|
59
|
private boolean firstRun = true;
|
58
|
60
|
|
59
|
|
- /** Instatiate the wizard. */
|
60
|
|
- public SwingFirstRunWizard() {
|
61
|
|
- this(true);
|
|
61
|
+ /**
|
|
62
|
+ * Instatiate the wizard.
|
|
63
|
+ *
|
|
64
|
+ * @param parentWindow Parent window
|
|
65
|
+ */
|
|
66
|
+ public SwingFirstRunWizard(final Window parentWindow) {
|
|
67
|
+ this(parentWindow, true);
|
62
|
68
|
}
|
63
|
69
|
|
64
|
70
|
/**
|
65
|
71
|
* Instantiate the wizard.
|
66
|
72
|
*
|
|
73
|
+ * @param parentWindow Parent window
|
67
|
74
|
* @param firstRun is this the first run or an update?
|
68
|
75
|
*/
|
69
|
|
- public SwingFirstRunWizard(final boolean firstRun) {
|
|
76
|
+ public SwingFirstRunWizard(final Window parentWindow, final boolean firstRun) {
|
70
|
77
|
this.firstRun = firstRun;
|
71
|
78
|
|
72
|
|
- wizardDialog =
|
73
|
|
- new WizardDialog("DMDirc: " + (firstRun ? "Setup wizard" :
|
74
|
|
- "Migration wizard"), new ArrayList<Step>(), this, null);
|
|
79
|
+ wizardDialog = new WizardDialog("DMDirc: " + (firstRun ? "Setup wizard"
|
|
80
|
+ : "Migration wizard"), new ArrayList<Step>(), this, parentWindow,
|
|
81
|
+ ModalityType.APPLICATION_MODAL);
|
75
|
82
|
wizardDialog.setIconImage(IconManager.getIconManager().getImage("icon"));
|
76
|
83
|
wizardDialog.addWizardListener(this);
|
77
|
84
|
if(Apple.isAppleUI()) {
|