Browse Source

Use ClientInfo in place of Info.

Change-Id: I9d19b5144033704a1de126a5391e985e0314609e
Reviewed-on: http://gerrit.dmdirc.com/3123
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
tags/0.8
Chris Smith 10 years ago
parent
commit
7d1237b13b

+ 10
- 6
src/com/dmdirc/addons/ui_swing/dialogs/FeedbackDialog.java View File

@@ -33,7 +33,7 @@ import com.dmdirc.addons.ui_swing.components.text.TextLabel;
33 33
 import com.dmdirc.commandline.CommandLineOptionsModule.Directory;
34 34
 import com.dmdirc.commandline.CommandLineOptionsModule.DirectoryType;
35 35
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
36
-import com.dmdirc.ui.core.util.Info;
36
+import com.dmdirc.util.ClientInfo;
37 37
 
38 38
 import java.awt.Insets;
39 39
 import java.awt.event.ActionEvent;
@@ -81,9 +81,9 @@ public class FeedbackDialog extends StandardDialog implements ActionListener, Do
81 81
     /**
82 82
      * Instantiates the feedback dialog.
83 83
      *
84
-     * @param parentWindow Parent window
84
+     * @param parentWindow  Parent window
85 85
      * @param serverManager Server manager
86
-     * @param config Config
86
+     * @param config        Config
87 87
      * @param baseDirectory The base directory to include in feedback.
88 88
      */
89 89
     @Inject
@@ -226,10 +226,13 @@ public class FeedbackDialog extends StandardDialog implements ActionListener, Do
226 226
             }
227 227
         }
228 228
         if (dmdircCheckbox.isSelected()) {
229
-            dmdircInfo.append("DMDirc version: ").append(Info.getDMDircVersion(config)).append("\n");
229
+            dmdircInfo.append("DMDirc version: ").append(ClientInfo.getVersionInformation())
230
+                    .append("\n");
230 231
             dmdircInfo.append("Profile directory: ").append(configDirectory).append("\n");
231
-            dmdircInfo.append("Java version: ").append(Info.getJavaVersion()).append("\n");
232
-            dmdircInfo.append("OS Version: ").append(Info.getOSVersion()).append("\n");
232
+            dmdircInfo.append("Java version: ").append(ClientInfo.getJavaInformation())
233
+                    .append("\n");
234
+            dmdircInfo.append("OS Version: ").append(ClientInfo.getOperatingSystemInformation())
235
+                    .append("\n");
233 236
             dmdircInfo.append("Look & Feel: ").append(SwingController.getLookAndFeel());
234 237
         }
235 238
         new SendWorker(this, config, name.getText().trim(), email.getText().trim(),
@@ -290,4 +293,5 @@ public class FeedbackDialog extends StandardDialog implements ActionListener, Do
290 293
     public void changedUpdate(final DocumentEvent e) {
291 294
         // Do nothing
292 295
     }
296
+
293 297
 }

+ 21
- 20
src/com/dmdirc/addons/ui_swing/dialogs/about/InfoPanel.java View File

@@ -28,7 +28,7 @@ import com.dmdirc.addons.ui_swing.UIUtilities;
28 28
 import com.dmdirc.commandline.CommandLineOptionsModule.Directory;
29 29
 import com.dmdirc.commandline.CommandLineOptionsModule.DirectoryType;
30 30
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
31
-import com.dmdirc.ui.core.util.Info;
31
+import com.dmdirc.util.ClientInfo;
32 32
 import com.dmdirc.util.DateUtils;
33 33
 
34 34
 import java.awt.Font;
@@ -60,8 +60,8 @@ public final class InfoPanel extends JPanel {
60 60
     /**
61 61
      * Creates a new instance of InfoPanel.
62 62
      *
63
-     * @param controller Parent swing controller
64
-     * @param globalConfig The config to read settings from.
63
+     * @param controller    Parent swing controller
64
+     * @param globalConfig  The config to read settings from.
65 65
      * @param baseDirectory The base directory that DMDirc is using for settings.
66 66
      */
67 67
     @Inject
@@ -88,23 +88,23 @@ public final class InfoPanel extends JPanel {
88 88
                 + "{ font-family: " + font.getFamily() + "; " + "font-size: "
89 89
                 + font.getSize() + "pt; }");
90 90
 
91
-         infoPane.setText("<html>"
92
-                 + "<b>DMDirc version: </b>" + Info.getDMDircVersion(globalConfig) + "<br>"
93
-                 + "<b>Mode Alises version: </b>" + globalConfig.getOption("identity", "modealiasversion")
94
-                 + "<br>"
95
-                 + "<b>Swing UI version: </b>" + controller.getVersion().toString() + "<br>"
96
-                 + "<b>OS Version: </b>" + Info.getOSVersion() + "<br>"
97
-                 + "<b>Profile directory: </b>" + baseDirectory + "<br>"
98
-                 + "<b>Java version: </b>" + Info.getJavaVersion() + "<br>"
99
-                 + "<b>Look and Feel: </b>" + SwingController.getLookAndFeel()
100
-                 + "<br>"
101
-                 + "<b>MiG Layout version: </b>" + LayoutUtil.getVersion()
102
-                 + "<br>"
103
-                 + "<b>Java Default charset: </b>" + Charset.defaultCharset()
104
-                 .displayName() + "<br>"
105
-                 + "<b>Client Uptime: </b>" + DateUtils.formatDuration(
106
-                 (int) Info.getUptime()/1000) + "<br>"
107
-                 + "</html>");
91
+        infoPane.setText("<html>"
92
+                + "<b>DMDirc version: </b>" + ClientInfo.getVersionInformation() + "<br>"
93
+                + "<b>Mode Alises version: </b>"
94
+                + globalConfig.getOption("identity", "modealiasversion")
95
+                + "<br>"
96
+                + "<b>Swing UI version: </b>" + controller.getVersion().toString() + "<br>"
97
+                + "<b>OS Version: </b>" + ClientInfo.getOperatingSystemInformation() + "<br>"
98
+                + "<b>Profile directory: </b>" + baseDirectory + "<br>"
99
+                + "<b>Java version: </b>" + ClientInfo.getJavaInformation() + "<br>"
100
+                + "<b>Look and Feel: </b>" + SwingController.getLookAndFeel()
101
+                + "<br>"
102
+                + "<b>MiG Layout version: </b>" + LayoutUtil.getVersion()
103
+                + "<br>"
104
+                + "<b>Java Default charset: </b>" + Charset.defaultCharset().displayName() + "<br>"
105
+                + "<b>Client Uptime: </b>"
106
+                + DateUtils.formatDuration((int) ClientInfo.getUptime() / 1000) + "<br>"
107
+                + "</html>");
108 108
         infoPane.setEditable(false);
109 109
         scrollPane.setViewportView(infoPane);
110 110
 
@@ -113,4 +113,5 @@ public final class InfoPanel extends JPanel {
113 113
         setLayout(new MigLayout("ins rel, fill"));
114 114
         add(scrollPane, "grow, push, wrap");
115 115
     }
116
+
116 117
 }

Loading…
Cancel
Save