summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-03-21 22:33:09 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-03-22 14:54:54 (GMT)
commitf5c2750f56c78d115bb9e8a7c5d50316da98b6d5 (patch)
tree661c761e7ebb526e1d71848c127046605e036729 /Swift/Controllers/MainController.cpp
parent37a3ff6afe96c39bbf075d05da72e5f2c684dfa4 (diff)
downloadswift-f5c2750f56c78d115bb9e8a7c5d50316da98b6d5.zip
swift-f5c2750f56c78d115bb9e8a7c5d50316da98b6d5.tar.bz2
Lots of plumbing for event view.
This isn't ready yet, but clicking on a message in the event view will now cause the chat to pop up, and the plumbing is there for doing something with subscription requests - I just don't, yet.
Diffstat (limited to 'Swift/Controllers/MainController.cpp')
-rw-r--r--Swift/Controllers/MainController.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index d013f5f..310d28f 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -134,10 +134,8 @@ void MainController::handleConnected() {
presenceOracle_ = new PresenceOracle(client_);
nickResolver_ = new NickResolver(xmppRoster_);
lastSentPresence_ = boost::shared_ptr<Presence>();
-
- client_->onPresenceReceived.connect(boost::bind(&MainController::handleIncomingPresence, this, _1));
-
- chatsManager_ = new ChatsManager(jid_, client_, client_, eventController_, chatWindowFactory_, treeWidgetFactory_, nickResolver_, presenceOracle_, serverDiscoInfo_, presenceSender_);
+
+ chatsManager_ = new ChatsManager(jid_, client_, client_, eventController_, chatWindowFactory_, treeWidgetFactory_, nickResolver_, presenceOracle_, serverDiscoInfo_, presenceSender_, uiEventStream_);
client_->onMessageReceived.connect(boost::bind(&ChatsManager::handleIncomingMessage, chatsManager_, _1));
avatarManager_ = new AvatarManager(client_, client_, avatarStorage_, chatsManager_);
@@ -145,7 +143,7 @@ void MainController::handleConnected() {
chatsManager_->setAvatarManager(avatarManager_);
- rosterController_ = new RosterController(jid_, xmppRoster_, avatarManager_, mainWindowFactory_, treeWidgetFactory_, nickResolver_);
+ rosterController_ = new RosterController(jid_, xmppRoster_, avatarManager_, mainWindowFactory_, treeWidgetFactory_, nickResolver_, presenceOracle_, eventController_, uiEventStream_);
rosterController_->onChangeStatusRequest.connect(boost::bind(&MainController::handleChangeStatusRequest, this, _1, _2));
rosterController_->onSignOutRequest.connect(boost::bind(&MainController::signOut, this));
rosterController_->onStartChatRequest.connect(boost::bind(&ChatsManager::handleChatRequest, chatsManager_, _1));
@@ -254,11 +252,6 @@ void MainController::handleInputIdleChanged(bool idle) {
}
}
-void MainController::handleIncomingPresence(boost::shared_ptr<Presence> presence) {
- //FIXME: subscribe, subscribed
- rosterController_->handleIncomingPresence(presence);
-}
-
void MainController::handleLoginRequest(const String &username, const String &password, const String& certificateFile, bool remember) {
loginWindow_->setMessage("");
ProfileSettingsProvider* profileSettings = new ProfileSettingsProvider(username, settings_);