Skip to content

Commit

Permalink
Remove child event busses.
Browse files Browse the repository at this point in the history
Closes #662.
  • Loading branch information
csmith committed Feb 26, 2016
1 parent 998b950 commit 4382bce
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 200 deletions.
8 changes: 1 addition & 7 deletions src/com/dmdirc/FrameContainer.java
Expand Up @@ -37,7 +37,6 @@
import com.dmdirc.ui.messages.BackBuffer;
import com.dmdirc.ui.messages.BackBufferFactory;
import com.dmdirc.ui.messages.UnreadStatusManager;
import com.dmdirc.util.ChildEventBusManager;

import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -65,8 +64,6 @@ public class FrameContainer implements WindowModel {
private final ConfigChangeListener changer = (d, k) -> iconUpdated();
/** The UI components that this frame requires. */
private final Set<String> components;
/** The manager to use to manage our event bus. */
private final ChildEventBusManager eventBusManager;
/** Event bus to dispatch events to. */
private final DMDircMBassador eventBus;
/** The manager handling this frame's unread status. */
Expand Down Expand Up @@ -99,9 +96,7 @@ public FrameContainer(
this.components = new HashSet<>(components);
this.backBufferFactory = backBufferFactory;

eventBusManager = new ChildEventBusManager(eventBus);
eventBusManager.connect();
this.eventBus = eventBusManager.getChildBus();
this.eventBus = eventBus;
this.unreadStatusManager = new UnreadStatusManager(this);
this.eventBus.subscribe(unreadStatusManager);
configManager.getBinder().bind(unreadStatusManager, UnreadStatusManager.class);
Expand Down Expand Up @@ -192,7 +187,6 @@ public void close() {
eventBus.unsubscribe(unreadStatusManager);
configManager.getBinder().unbind(unreadStatusManager);
eventBus.publish(new FrameClosingEvent(this));
eventBusManager.disconnect();
getBackBuffer().stopAddingEvents();
}

Expand Down
100 changes: 0 additions & 100 deletions src/com/dmdirc/util/ChildEventBusManager.java

This file was deleted.

93 changes: 0 additions & 93 deletions test/com/dmdirc/util/ChildEventBusManagerTest.java

This file was deleted.

0 comments on commit 4382bce

Please sign in to comment.