Browse Source

issue 1226: Status bar displays incorrectly before windows are opened

git-svn-id: http://svn.dmdirc.com/trunk@4075 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Gregory Holmes 16 years ago
parent
commit
638487529f
1 changed files with 9 additions and 5 deletions
  1. 9
    5
      src/com/dmdirc/ui/swing/components/SwingStatusBar.java

+ 9
- 5
src/com/dmdirc/ui/swing/components/SwingStatusBar.java View File

@@ -106,9 +106,9 @@ public final class SwingStatusBar extends JPanel implements MouseListener,
106 106
 
107 107
         setLayout(new MigLayout("fill, ins 0, hidemode 3"));
108 108
 
109
-        add(messageLabel, "growx, pushx, sgy components, hmax 20, hmin 20, dock west");
110
-        add(inviteLabel, "sgy components, hmax 20, hmin 20, dock east");
111
-        add(errorLabel, "sgy components, hmax 20, hmin 20, dock east");
109
+        add(messageLabel, "growx, pushx, sgy components, hmax 20, hmin 20");
110
+        add(errorLabel, "sgy components, hmax 20, hmin 20");
111
+        add(inviteLabel, "sgy components, hmax 20, hmin 20");
112 112
 
113 113
         checkErrors();
114 114
     }
@@ -257,8 +257,8 @@ public final class SwingStatusBar extends JPanel implements MouseListener,
257 257
         if (mouseEvent.getButton() == MouseEvent.BUTTON1) {
258 258
             if (mouseEvent.getSource() == errorLabel) {
259 259
                 ErrorListDialog.showErrorListDialog();
260
-            } else if (mouseEvent.getSource() == updateLabel 
261
-                    && updateLabel.getToolTipText().equals("Updates available")) {
260
+            } else if (mouseEvent.getSource() == updateLabel && updateLabel.getToolTipText().
261
+                    equals("Updates available")) {
262 262
                 SwingUpdaterDialog.showSwingUpdaterDialog(UpdateChecker.getAvailableUpdates());
263 263
             }
264 264
         }
@@ -273,7 +273,11 @@ public final class SwingStatusBar extends JPanel implements MouseListener,
273 273
                 /** {@inheritDoc} */
274 274
                 @Override
275 275
                 public void run() {
276
+                    remove(errorLabel);
277
+                    remove(inviteLabel);
276 278
                     add(component, "sgy components, hmax 20, hmin 20");
279
+                    add(inviteLabel, "sgy components, hmax 20, hmin 20");
280
+                    add(errorLabel, "sgy components, hmax 20, hmin 20");
277 281
                     validate();
278 282
                 }
279 283
             });

Loading…
Cancel
Save