diff options
author | Richard Nelson <none@none> | 2010-05-24 16:37:52 -0700 |
---|---|---|
committer | Richard Nelson <none@none> | 2010-05-24 16:37:52 -0700 |
commit | 2920d4c46f99c8c5bc8942a08a87fa204c57464b (patch) | |
tree | 515837435a28924b028815fc79f7f4f2ec18871e /indra/newview/llpanelimcontrolpanel.cpp | |
parent | a146a0f27b3ea2fadaa9e7286645a0944996309d (diff) | |
parent | d674d11f895b8f3d578cded931cdc1c430379c95 (diff) |
merge
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 709bb83fe4..89eef8b8d3 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -185,7 +185,7 @@ void LLPanelIMControlPanel::onViewProfileButtonClicked() void LLPanelIMControlPanel::onAddFriendButtonClicked() { LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon"); - std::string full_name = avatar_icon->getFirstName() + " " + avatar_icon->getLastName(); + std::string full_name = avatar_icon->getFullName(); LLAvatarActions::requestFriendshipDialog(mAvatarID, full_name); } @@ -227,6 +227,15 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) childSetEnabled("share_btn", FALSE); childSetEnabled("teleport_btn", FALSE); childSetEnabled("pay_btn", FALSE); + + getChild<LLTextBox>("avatar_name")->setValue(im_session->mName); + getChild<LLTextBox>("avatar_name")->setToolTip(im_session->mName); + } + else + { + // If the participant is an avatar, fetch the currect name + gCacheName->get(mAvatarID, false, + boost::bind(&LLPanelIMControlPanel::onNameCache, this, _1, _2, _3)); } } @@ -242,6 +251,16 @@ void LLPanelIMControlPanel::changed(U32 mask) } } +void LLPanelIMControlPanel::onNameCache(const LLUUID& id, const std::string& full_name, bool is_group) +{ + if ( id == mAvatarID ) + { + std::string avatar_name = full_name; + getChild<LLTextBox>("avatar_name")->setValue(avatar_name); + getChild<LLTextBox>("avatar_name")->setToolTip(avatar_name); + } +} + LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id): mParticipantList(NULL) { |