summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-09 11:04:52 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-11 21:53:44 (GMT)
commit10d8ba50a9e09517cfe4a6d4c3d51a768e989125 (patch)
tree33e3fb87c07cdf26c91e8146335e41a167aa1bd6 /Swift
parent6f31cc8a329d15767d54511edd14339ac3dfdd7a (diff)
downloadswift-10d8ba50a9e09517cfe4a6d4c3d51a768e989125.zip
swift-10d8ba50a9e09517cfe4a6d4c3d51a768e989125.tar.bz2
Refactoring VCardUpdateAvatarManager.
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp6
-rw-r--r--Swift/Controllers/Chat/MUCController.h2
-rw-r--r--Swift/Controllers/RosterController.cpp4
-rw-r--r--Swift/Controllers/RosterController.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 3b37179..3031efe 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -75,7 +75,7 @@ MUCController::MUCController (
chatWindow_->addSystemMessage("Trying to join room " + toJID_.toString());
rejoin();
if (avatarManager_ != NULL) {
- avatarChangedConnection_ = (avatarManager_->onAvatarChanged.connect(boost::bind(&MUCController::handleAvatarChanged, this, _1, _2)));
+ avatarChangedConnection_ = (avatarManager_->onAvatarChanged.connect(boost::bind(&MUCController::handleAvatarChanged, this, _1)));
}
}
@@ -148,7 +148,7 @@ void MUCController::handleJoinComplete(const String& nick) {
setEnabled(true);
}
-void MUCController::handleAvatarChanged(const JID& jid, const String&) {
+void MUCController::handleAvatarChanged(const JID& jid) {
if (parting_ || !jid.equals(toJID_, JID::WithoutResource)) {
return;
}
@@ -192,7 +192,7 @@ void MUCController::handleOccupantJoined(const MUCOccupant& occupant) {
}
}
if (avatarManager_ != NULL) {
- handleAvatarChanged(jid, "dummy");
+ handleAvatarChanged(jid);
}
}
diff --git a/Swift/Controllers/Chat/MUCController.h b/Swift/Controllers/Chat/MUCController.h
index 4601386..c922e83 100644
--- a/Swift/Controllers/Chat/MUCController.h
+++ b/Swift/Controllers/Chat/MUCController.h
@@ -60,7 +60,7 @@ namespace Swift {
void clearPresenceQueue();
void addPresenceMessage(const String& message);
void handleWindowClosed();
- void handleAvatarChanged(const JID& jid, const String&);
+ void handleAvatarChanged(const JID& jid);
void handleOccupantJoined(const MUCOccupant& occupant);
void handleOccupantLeft(const MUCOccupant& occupant, MUC::LeavingType type, const String& reason);
void handleOccupantPresenceChange(boost::shared_ptr<Presence> presence);
diff --git a/Swift/Controllers/RosterController.cpp b/Swift/Controllers/RosterController.cpp
index 87b0b74..b4626fb 100644
--- a/Swift/Controllers/RosterController.cpp
+++ b/Swift/Controllers/RosterController.cpp
@@ -83,7 +83,7 @@ void RosterController::setAvatarManager(AvatarManager* avatarManager) {
}
avatarManager_ = avatarManager;
if (avatarManager != NULL) {
- avatarManager_->onAvatarChanged.connect(boost::bind(&RosterController::handleAvatarChanged, this, _1, _2));
+ avatarManager_->onAvatarChanged.connect(boost::bind(&RosterController::handleAvatarChanged, this, _1));
mainWindow_->setMyAvatarPath(avatarManager_->getAvatarPath(myJID_).string());
}
}
@@ -221,7 +221,7 @@ void RosterController::handleSubscriptionRequestDeclined(SubscriptionRequestEven
presenceOracle_->cancelSubscription(event->getJID());
}
-void RosterController::handleAvatarChanged(const JID& jid, const String&) {
+void RosterController::handleAvatarChanged(const JID& jid) {
String path = avatarManager_->getAvatarPath(jid).string();
roster_->applyOnItems(SetAvatar(jid, path));
if (jid.equals(myJID_, JID::WithoutResource)) {
diff --git a/Swift/Controllers/RosterController.h b/Swift/Controllers/RosterController.h
index 7e2b3da..dea1f0f 100644
--- a/Swift/Controllers/RosterController.h
+++ b/Swift/Controllers/RosterController.h
@@ -41,7 +41,7 @@ namespace Swift {
void setNickResolver(NickResolver* nickResolver);
boost::signal<void (StatusShow::Type, const String&)> onChangeStatusRequest;
boost::signal<void ()> onSignOutRequest;
- void handleAvatarChanged(const JID& jid, const String& hash);
+ void handleAvatarChanged(const JID& jid);
void setEnabled(bool enabled);
private:
void handleOnJIDAdded(const JID &jid);