diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-10-31 18:51:01 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-11-03 12:17:40 (GMT) |
commit | d509598b0f0edf5e103caedbab8662edc834445e (patch) | |
tree | 9365ef58175eee453f999c1c5b8515cb50cf90e0 /Swift/Controllers/Chat/MUCController.cpp | |
parent | badcdcb7456d38016ea1746d6754a40dd9646813 (diff) | |
download | swift-contrib-d509598b0f0edf5e103caedbab8662edc834445e.zip swift-contrib-d509598b0f0edf5e103caedbab8662edc834445e.tar.bz2 |
Refactoring Presence & MUC handling.
Diffstat (limited to 'Swift/Controllers/Chat/MUCController.cpp')
-rw-r--r-- | Swift/Controllers/Chat/MUCController.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp index ff102e7..259b715 100644 --- a/Swift/Controllers/Chat/MUCController.cpp +++ b/Swift/Controllers/Chat/MUCController.cpp @@ -36,10 +36,9 @@ namespace Swift { */ MUCController::MUCController ( const JID& self, - const JID &muc, + MUC::ref muc, const String &nick, StanzaChannel* stanzaChannel, - PresenceSender* presenceSender, IQRouter* iqRouter, ChatWindowFactory* chatWindowFactory, PresenceOracle* presenceOracle, @@ -48,7 +47,7 @@ MUCController::MUCController ( bool useDelayForLatency, TimerFactory* timerFactory, EventController* eventController) : - ChatControllerBase(self, stanzaChannel, iqRouter, chatWindowFactory, muc, presenceOracle, avatarManager, useDelayForLatency, uiEventStream, eventController, timerFactory), muc_(new MUC(stanzaChannel, iqRouter, presenceSender, muc)), nick_(nick) { + ChatControllerBase(self, stanzaChannel, iqRouter, chatWindowFactory, muc->getJID(), presenceOracle, avatarManager, useDelayForLatency, uiEventStream, eventController, timerFactory), muc_(muc), nick_(nick) { parting_ = true; joined_ = false; lastWasPresence_ = false; @@ -59,7 +58,7 @@ MUCController::MUCController ( completer_ = new TabComplete(); chatWindow_->setRosterModel(roster_); chatWindow_->setTabComplete(completer_); - chatWindow_->setName(muc.getNode()); + chatWindow_->setName(muc->getJID().getNode()); chatWindow_->onClosed.connect(boost::bind(&MUCController::handleWindowClosed, this)); muc_->onJoinComplete.connect(boost::bind(&MUCController::handleJoinComplete, this, _1)); muc_->onJoinFailed.connect(boost::bind(&MUCController::handleJoinFailed, this, _1)); @@ -80,7 +79,6 @@ MUCController::MUCController ( } MUCController::~MUCController() { - delete muc_; chatWindow_->setRosterModel(NULL); delete roster_; if (loginCheckTimer_) { |