|
@@ -24,15 +24,10 @@ package com.dmdirc.addons.ui_swing.dialogs.about;
|
24
|
24
|
|
25
|
25
|
import com.dmdirc.ClientModule.GlobalConfig;
|
26
|
26
|
import com.dmdirc.DMDircMBassador;
|
27
|
|
-import com.dmdirc.addons.ui_swing.SwingController;
|
28
|
27
|
import com.dmdirc.addons.ui_swing.dialogs.StandardDialog;
|
29
|
28
|
import com.dmdirc.addons.ui_swing.injection.MainWindow;
|
30
|
|
-import com.dmdirc.events.ClientInfoRequestEvent;
|
31
|
29
|
import com.dmdirc.interfaces.config.AggregateConfigProvider;
|
32
|
30
|
import com.dmdirc.interfaces.ui.AboutDialogModel;
|
33
|
|
-import com.dmdirc.plugins.PluginDomain;
|
34
|
|
-import com.dmdirc.plugins.PluginInfo;
|
35
|
|
-import com.dmdirc.ui.core.about.InfoItem;
|
36
|
31
|
import com.dmdirc.ui.core.util.URLHandler;
|
37
|
32
|
|
38
|
33
|
import java.awt.Window;
|
|
@@ -40,14 +35,10 @@ import java.awt.Window;
|
40
|
35
|
import javax.inject.Inject;
|
41
|
36
|
import javax.swing.JButton;
|
42
|
37
|
import javax.swing.JTabbedPane;
|
43
|
|
-import javax.swing.UIManager;
|
44
|
38
|
import javax.swing.WindowConstants;
|
45
|
39
|
|
46
|
|
-import net.miginfocom.layout.LayoutUtil;
|
47
|
40
|
import net.miginfocom.swing.MigLayout;
|
48
|
41
|
|
49
|
|
-import net.engio.mbassy.listener.Handler;
|
50
|
|
-
|
51
|
42
|
/**
|
52
|
43
|
* About dialog.
|
53
|
44
|
*/
|
|
@@ -58,7 +49,6 @@ public class AboutDialog extends StandardDialog {
|
58
|
49
|
private final AboutDialogModel model;
|
59
|
50
|
private final DMDircMBassador eventBus;
|
60
|
51
|
private final AggregateConfigProvider config;
|
61
|
|
- private final PluginInfo pluginInfo;
|
62
|
52
|
|
63
|
53
|
@Inject
|
64
|
54
|
public AboutDialog(
|
|
@@ -66,16 +56,12 @@ public class AboutDialog extends StandardDialog {
|
66
|
56
|
@MainWindow final Window parentWindow,
|
67
|
57
|
final AboutDialogModel model,
|
68
|
58
|
final URLHandler urlHandler,
|
69
|
|
- final DMDircMBassador eventBus,
|
70
|
|
- @PluginDomain(SwingController.class) final PluginInfo pluginInfo) {
|
|
59
|
+ final DMDircMBassador eventBus) {
|
71
|
60
|
super(parentWindow, ModalityType.MODELESS);
|
72
|
61
|
this.urlHandler = urlHandler;
|
73
|
62
|
this.model = model;
|
74
|
63
|
this.eventBus = eventBus;
|
75
|
64
|
this.config = config;
|
76
|
|
- this.pluginInfo = pluginInfo;
|
77
|
|
-
|
78
|
|
- eventBus.subscribe(this);
|
79
|
65
|
model.load();
|
80
|
66
|
initComponents();
|
81
|
67
|
}
|
|
@@ -103,19 +89,4 @@ public class AboutDialog extends StandardDialog {
|
103
|
89
|
getContentPane().add(tabbedPane, "grow, push");
|
104
|
90
|
getContentPane().add(getOkButton(), "right");
|
105
|
91
|
}
|
106
|
|
-
|
107
|
|
- @Handler
|
108
|
|
- public void handleInfoRequest(final ClientInfoRequestEvent event) {
|
109
|
|
- event.addInfoItem(InfoItem.create("Swing UI Version",
|
110
|
|
- pluginInfo.getMetaData().getVersion().toString()),
|
111
|
|
- InfoItem.create("Look and Feel", UIManager.getLookAndFeel().getName()),
|
112
|
|
- InfoItem.create("MiG Layout Version", LayoutUtil.getVersion())
|
113
|
|
- );
|
114
|
|
- }
|
115
|
|
-
|
116
|
|
- @Override
|
117
|
|
- public void dispose() {
|
118
|
|
- eventBus.unsubscribe(this);
|
119
|
|
- super.dispose();
|
120
|
|
- }
|
121
|
92
|
}
|