diff options
Diffstat (limited to 'Swift/Controllers/RosterController.cpp')
-rw-r--r-- | Swift/Controllers/RosterController.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Swift/Controllers/RosterController.cpp b/Swift/Controllers/RosterController.cpp index 46248a1..5ba00e4 100644 --- a/Swift/Controllers/RosterController.cpp +++ b/Swift/Controllers/RosterController.cpp @@ -66,10 +66,16 @@ RosterController::~RosterController() { void RosterController::setNickResolver(NickResolver* nickResolver) { nickResolver_ = nickResolver; if (nickResolver_ != NULL) { - mainWindow_->setMyName(nickResolver_->jidToNick(myJID_)); + handleOwnNickChanged(nickResolver_->jidToNick(myJID_)); + + nickResolver_->onOwnNickChanged.connect(boost::bind(&RosterController::handleOwnNickChanged, this, _1)); } } +void RosterController::handleOwnNickChanged(const String& nick) { + mainWindow_->setMyName(nick); +} + void RosterController::setAvatarManager(AvatarManager* avatarManager) { if (avatarManager_ != NULL) { //FIXME: disconnect old signal; |