Browse Source

Fix licence loading in about dialog.

Change-Id: I3187d75463129f8ff7c3191dc0be6f1c16d2217c
Reviewed-on: http://gerrit.dmdirc.com/3069
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
tags/0.8
Greg Holmes 10 years ago
parent
commit
df9abe4df5
1 changed files with 4 additions and 8 deletions
  1. 4
    8
      src/com/dmdirc/addons/ui_swing/dialogs/about/LicencesPanel.java

+ 4
- 8
src/com/dmdirc/addons/ui_swing/dialogs/about/LicencesPanel.java View File

@@ -81,7 +81,8 @@ public class LicencesPanel extends JPanel implements TreeSelectionListener {
81 81
         super();
82 82
 
83 83
         this.config = globalConfig;
84
-        initComponents(new LicenceLoader(pluginManager, list, listModel));
84
+        initComponents();
85
+        new LicenceLoader(pluginManager, list, listModel).executeInExecutor();
85 86
         addListeners();
86 87
         layoutComponents();
87 88
     }
@@ -103,17 +104,13 @@ public class LicencesPanel extends JPanel implements TreeSelectionListener {
103 104
     }
104 105
 
105 106
     /** Initialises the components. */
106
-    private void initComponents(final LicenceLoader licenceLoader) {
107
+    private void initComponents() {
107 108
         setOpaque(UIUtilities.getTabbedPaneOpaque());
108 109
         listModel = new DefaultTreeModel(new DefaultMutableTreeNode());
109 110
         list = new JTree(listModel) {
110 111
 
111 112
             /**
112
-             * A version number for this class. It should be changed whenever
113
-             * the class
114
-             * structure is changed (or anything else that would prevent
115
-             * serialized
116
-             * objects being unserialized with the new class).
113
+             * A version number for this class.
117 114
              */
118 115
             private static final long serialVersionUID = 1;
119 116
 
@@ -136,7 +133,6 @@ public class LicencesPanel extends JPanel implements TreeSelectionListener {
136 133
         list.getSelectionModel().setSelectionMode(TreeSelectionModel.
137 134
                 SINGLE_TREE_SELECTION);
138 135
         new TreeScroller(list);
139
-        licenceLoader.executeInExecutor();
140 136
         licence = new JEditorPane();
141 137
         licence.setEditorKit(new HTMLEditorKit());
142 138
         final Font font = UIManager.getFont("Label.font");

Loading…
Cancel
Save