diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-11-28 15:14:53 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-11-28 15:22:55 (GMT) |
commit | 4a349f3a0e2715ee1d0701ef0c715cf8bea58ce5 (patch) | |
tree | 90893d6763cbc2050e8ffced507d9c65dea2910c /Swiften/Client | |
parent | f4e2f1deecd322e859bfb27bc5a9ab97726481c5 (diff) | |
download | swift-4a349f3a0e2715ee1d0701ef0c715cf8bea58ce5.zip swift-4a349f3a0e2715ee1d0701ef0c715cf8bea58ce5.tar.bz2 |
Change Chat Window titles when contacts are renamed.
Resolves: #630
Release-Notes: Chat window titles will be updated when contacts are renamed.
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/NickResolver.cpp | 5 | ||||
-rw-r--r-- | Swiften/Client/NickResolver.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/Client/NickResolver.cpp b/Swiften/Client/NickResolver.cpp index d06a94d..c151dfa 100644 --- a/Swiften/Client/NickResolver.cpp +++ b/Swiften/Client/NickResolver.cpp @@ -26,6 +26,11 @@ NickResolver::NickResolver(const JID& ownJID, XMPPRoster* xmppRoster, VCardManag vcardManager_->onVCardChanged.connect(boost::bind(&NickResolver::handleVCardReceived, this, _1, _2)); } mucRegistry_ = mucRegistry; + xmppRoster_->onJIDUpdated.connect(boost::bind(&NickResolver::handleJIDUpdated, this, _1, _2, _3)); +} + +void NickResolver::handleJIDUpdated(const JID& jid, const String& previousNick, const std::vector<String>& /*groups*/) { + onNickChanged(jid, previousNick); } String NickResolver::jidToNick(const JID& jid) { diff --git a/Swiften/Client/NickResolver.h b/Swiften/Client/NickResolver.h index 7f00acd..806afb8 100644 --- a/Swiften/Client/NickResolver.h +++ b/Swiften/Client/NickResolver.h @@ -23,8 +23,10 @@ namespace Swift { String jidToNick(const JID& jid); boost::signal<void (const String&)> onOwnNickChanged; + boost::signal<void (const JID&, const String& /*previousNick*/)> onNickChanged; private: void handleVCardReceived(const JID& jid, VCard::ref vCard); + void handleJIDUpdated(const JID& jid, const String& previousNick, const std::vector<String>& groups); private: JID ownJID_; |