diff options
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 80b29c4fa7..76612f2dd1 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -123,6 +123,8 @@ BOOL LLPanelIMControlPanel::postBuild() childSetAction("teleport_btn", boost::bind(&LLPanelIMControlPanel::onTeleportButtonClicked, this)); childSetAction("pay_btn", boost::bind(&LLPanelIMControlPanel::onPayButtonClicked, this)); childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId())); + + return LLPanelChatControlPanel::postBuild(); } @@ -166,6 +168,9 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(mAvatarID); + // Fetch the currect name + gCacheName->get(mAvatarID, FALSE, boost::bind(&LLPanelIMControlPanel::nameUpdatedCallback, this, _1, _2, _3, _4)); + llwarns << "gCacheName->get" << llendl; // Disable profile button if participant is not realy SL avatar LLIMModel::LLIMSession* im_session = im_model.findIMSession(session_id); @@ -173,6 +178,19 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) childSetEnabled("view_profile_btn", FALSE); } +void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group) +{ + llwarns << "LLPanelIMControlPanel::nameUpdatedCallback" << llendl; + if ( id == mAvatarID ) + { + llwarns << "LLPanelIMControlPanel::nameUpdatedCallback id == mAvatarID" << llendl; + std::string avatar_name; + avatar_name.assign(first); + avatar_name.append(" "); + avatar_name.append(last); + getChild<LLTextBox>("avatar_name")->setValue(avatar_name); + } +} LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id) { |