summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/EventWindowController.cpp3
-rw-r--r--Swift/Controllers/EventWindowController.h1
-rw-r--r--Swift/Controllers/RosterController.cpp10
-rw-r--r--Swift/Controllers/RosterController.h5
4 files changed, 13 insertions, 6 deletions
diff --git a/Swift/Controllers/EventWindowController.cpp b/Swift/Controllers/EventWindowController.cpp
index 1cf3dec..22cfbb3 100644
--- a/Swift/Controllers/EventWindowController.cpp
+++ b/Swift/Controllers/EventWindowController.cpp
@@ -14,7 +14,8 @@ EventWindowController::EventWindowController(EventController* eventController, E
eventController_ = eventController;
windowFactory_ = windowFactory;
window_ = windowFactory_->createEventWindow();
- eventController_->onEventQueueEventAdded.connect(boost::bind(&EventWindowController::handleEventQueueEventAdded, this, _1));
+ printf("Got new window, pointer %d\n", (int)window_);
+ eventAddedConnection_ = eventController_->onEventQueueEventAdded.connect(boost::bind(&EventWindowController::handleEventQueueEventAdded, this, _1));
}
EventWindowController::~EventWindowController() {
diff --git a/Swift/Controllers/EventWindowController.h b/Swift/Controllers/EventWindowController.h
index 476824f..0710da5 100644
--- a/Swift/Controllers/EventWindowController.h
+++ b/Swift/Controllers/EventWindowController.h
@@ -24,6 +24,7 @@ namespace Swift {
EventController* eventController_;
EventWindowFactory* windowFactory_;
EventWindow* window_;
+ boost::bsignals::scoped_connection eventAddedConnection_;
};
}
diff --git a/Swift/Controllers/RosterController.cpp b/Swift/Controllers/RosterController.cpp
index d047d17..ea7c7bb 100644
--- a/Swift/Controllers/RosterController.cpp
+++ b/Swift/Controllers/RosterController.cpp
@@ -39,17 +39,17 @@ RosterController::RosterController(const JID& jid, boost::shared_ptr<XMPPRoster>
eventController_ = eventController;
roster_->addFilter(offlineFilter_);
- mainWindow_->onJoinMUCRequest.connect(boost::bind(&RosterController::handleJoinMUCRequest, this, _1, _2));
- mainWindow_->onChangeStatusRequest.connect(boost::bind(&RosterController::handleChangeStatusRequest, this, _1, _2));
- mainWindow_->onShowOfflineToggled.connect(boost::bind(&RosterController::handleShowOfflineToggled, this, _1));
- mainWindow_->onSignOutRequest.connect(boost::bind(boost::ref(onSignOutRequest)));
+ joinMUCConnection_ = mainWindow_->onJoinMUCRequest.connect(boost::bind(&RosterController::handleJoinMUCRequest, this, _1, _2));
+ changeStatusConnection_ = mainWindow_->onChangeStatusRequest.connect(boost::bind(&RosterController::handleChangeStatusRequest, this, _1, _2));
+ showOfflineConnection_ = mainWindow_->onShowOfflineToggled.connect(boost::bind(&RosterController::handleShowOfflineToggled, this, _1));
+ signOutConnection_ = mainWindow_->onSignOutRequest.connect(boost::bind(boost::ref(onSignOutRequest)));
roster_->onUserAction.connect(boost::bind(&RosterController::handleUserAction, this, _1));
xmppRoster_->onJIDAdded.connect(boost::bind(&RosterController::handleOnJIDAdded, this, _1));
xmppRoster_->onJIDUpdated.connect(boost::bind(&RosterController::handleOnJIDUpdated, this, _1, _2, _3));
xmppRoster_->onJIDRemoved.connect(boost::bind(&RosterController::handleOnJIDRemoved, this, _1));
presenceOracle_->onPresenceSubscriptionRequest.connect(boost::bind(&RosterController::handleSubscriptionRequest, this, _1, _2));
presenceOracle_->onPresenceChange.connect(boost::bind(&RosterController::handleIncomingPresence, this, _1, _2));
- uiEventStream->onUIEvent.connect(boost::bind(&RosterController::handleUIEvent, this, _1));
+ uiEventConnection_ = uiEventStream->onUIEvent.connect(boost::bind(&RosterController::handleUIEvent, this, _1));
avatarManager_ = NULL;
setAvatarManager(avatarManager);
setNickResolver(nickResolver);
diff --git a/Swift/Controllers/RosterController.h b/Swift/Controllers/RosterController.h
index 651c157..32e3be6 100644
--- a/Swift/Controllers/RosterController.h
+++ b/Swift/Controllers/RosterController.h
@@ -70,6 +70,11 @@ namespace Swift {
NickResolver* nickResolver_;
PresenceOracle* presenceOracle_;
EventController* eventController_;
+ boost::bsignals::scoped_connection joinMUCConnection_;
+ boost::bsignals::scoped_connection changeStatusConnection_;
+ boost::bsignals::scoped_connection showOfflineConnection_;
+ boost::bsignals::scoped_connection signOutConnection_;
+ boost::bsignals::scoped_connection uiEventConnection_;
};
}
#endif