Browse Source

I touched the mainframe status bar launching, I therefore broken the

client. Bad Greg.

Change-Id: I853ad7d34a42cdba067b9aea6b7d1c6f77850ea3
Reviewed-on: http://gerrit.dmdirc.com/2207
Reviewed-by: Chris Smith <chris@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
tags/0.7rc1
Greg Holmes 12 years ago
parent
commit
f4da87c278

+ 9
- 6
src/com/dmdirc/addons/ui_swing/components/statusbar/InviteLabel.java View File

@@ -27,6 +27,7 @@ import com.dmdirc.Server;
27 27
 import com.dmdirc.ServerManager;
28 28
 import com.dmdirc.actions.ActionManager;
29 29
 import com.dmdirc.actions.CoreActionType;
30
+import com.dmdirc.addons.ui_swing.MainFrame;
30 31
 import com.dmdirc.addons.ui_swing.SelectionListener;
31 32
 import com.dmdirc.addons.ui_swing.SwingController;
32 33
 import com.dmdirc.addons.ui_swing.UIUtilities;
@@ -67,8 +68,8 @@ public class InviteLabel extends StatusbarPopupPanel<JLabel> implements
67 68
     private final JMenuItem dismiss;
68 69
     /** Accept invites menu item. */
69 70
     private final JMenuItem accept;
70
-    /** Swing controller. */
71
-    private final SwingController controller;
71
+    /** Main frame. */
72
+    private final MainFrame mainFrame;
72 73
     /** Active server. */
73 74
     private Server activeServer;
74 75
 
@@ -76,11 +77,13 @@ public class InviteLabel extends StatusbarPopupPanel<JLabel> implements
76 77
      * Instantiates a new invite label.
77 78
      *
78 79
      * @param controller Swing controller
80
+     * @param mainFrame Main frame
79 81
      */
80
-    public InviteLabel(final SwingController controller) {
82
+    public InviteLabel(final SwingController controller,
83
+            final MainFrame mainFrame) {
81 84
         super(new JLabel());
82 85
 
83
-        this.controller = controller;
86
+        this.mainFrame = mainFrame;
84 87
 
85 88
         setBorder(BorderFactory.createEtchedBorder());
86 89
         label.setIcon(new IconManager(controller.getGlobalConfig())
@@ -98,7 +101,7 @@ public class InviteLabel extends StatusbarPopupPanel<JLabel> implements
98 101
             server.addInviteListener(this);
99 102
         }
100 103
 
101
-        controller.getMainFrame().addSelectionListener(this);
104
+        mainFrame.addSelectionListener(this);
102 105
         ActionManager.getActionManager().registerListener(this,
103 106
                 CoreActionType.SERVER_CONNECTED);
104 107
         ActionManager.getActionManager().registerListener(this,
@@ -112,7 +115,7 @@ public class InviteLabel extends StatusbarPopupPanel<JLabel> implements
112 115
     /** {@inheritDoc} */
113 116
     @Override
114 117
     protected StatusbarPopupWindow getWindow() {
115
-        return new InvitePopup(this, activeServer, controller.getMainFrame());
118
+        return new InvitePopup(this, activeServer, mainFrame);
116 119
     }
117 120
 
118 121
     /**

+ 1
- 1
src/com/dmdirc/addons/ui_swing/components/statusbar/SwingStatusBar.java View File

@@ -73,7 +73,7 @@ public final class SwingStatusBar extends JPanel implements StatusBar {
73 73
                 controller.getGlobalConfig());
74 74
         errorPanel = new ErrorPanel(controller, mainFrame, this);
75 75
         updateLabel = new UpdaterLabel(controller);
76
-        inviteLabel = new InviteLabel(controller);
76
+        inviteLabel = new InviteLabel(controller, mainFrame);
77 77
 
78 78
         setLayout(new MigLayout("fill, ins 0, hidemode 3"));
79 79
 

Loading…
Cancel
Save