|
@@ -39,7 +39,7 @@ import com.dmdirc.events.ClientFocusGainedEvent;
|
39
|
39
|
import com.dmdirc.events.ClientFocusLostEvent;
|
40
|
40
|
import com.dmdirc.events.ClientMinimisedEvent;
|
41
|
41
|
import com.dmdirc.events.ClientUnminimisedEvent;
|
42
|
|
-import com.dmdirc.interfaces.FrameInfoListener;
|
|
42
|
+import com.dmdirc.events.FrameTitleChangedEvent;
|
43
|
43
|
import com.dmdirc.interfaces.LifecycleController;
|
44
|
44
|
import com.dmdirc.interfaces.NotificationListener;
|
45
|
45
|
import com.dmdirc.interfaces.config.AggregateConfigProvider;
|
|
@@ -74,8 +74,7 @@ import static com.dmdirc.addons.ui_swing.SwingPreconditions.checkOnEDT;
|
74
|
74
|
* The main application frame.
|
75
|
75
|
*/
|
76
|
76
|
public class MainFrame extends JFrame implements WindowListener,
|
77
|
|
- ConfigChangeListener, FrameInfoListener,
|
78
|
|
- NotificationListener, ActiveFrameManager {
|
|
77
|
+ ConfigChangeListener, NotificationListener, ActiveFrameManager {
|
79
|
78
|
|
80
|
79
|
/** A version number for this class. */
|
81
|
80
|
private static final long serialVersionUID = 9;
|
|
@@ -619,7 +618,6 @@ public class MainFrame extends JFrame implements WindowListener,
|
619
|
618
|
if (activeFrame == null) {
|
620
|
619
|
setActiveFrame(window);
|
621
|
620
|
}
|
622
|
|
- window.getContainer().addFrameInfoListener(this);
|
623
|
621
|
}
|
624
|
622
|
|
625
|
623
|
@Subscribe
|
|
@@ -646,24 +644,12 @@ public class MainFrame extends JFrame implements WindowListener,
|
646
|
644
|
setActiveFrame(focusOrder.peek());
|
647
|
645
|
}
|
648
|
646
|
}
|
649
|
|
- window.getContainer().removeFrameInfoListener(this);
|
650
|
647
|
}
|
651
|
648
|
|
652
|
|
- @Override
|
653
|
|
- public void iconChanged(final FrameContainer window, final String icon) {
|
654
|
|
- //Ignore
|
655
|
|
- }
|
656
|
|
-
|
657
|
|
- @Override
|
658
|
|
- public void nameChanged(final FrameContainer window, final String name) {
|
659
|
|
- //Ignore
|
660
|
|
- }
|
661
|
|
-
|
662
|
|
- @Override
|
663
|
|
- public void titleChanged(final FrameContainer window,
|
664
|
|
- final String title) {
|
665
|
|
- if (activeFrame != null && activeFrame.getContainer().equals(window)) {
|
666
|
|
- setTitle(title);
|
|
649
|
+ @Subscribe
|
|
650
|
+ public void titleChanged(final FrameTitleChangedEvent event) {
|
|
651
|
+ if (activeFrame != null && activeFrame.getContainer().equals(event.getContainer())) {
|
|
652
|
+ setTitle(event.getTitle());
|
667
|
653
|
}
|
668
|
654
|
}
|
669
|
655
|
|