summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelimcontrolpanel.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-02-01 17:06:18 -0800
committerJames Cook <james@lindenlab.com>2010-02-01 17:06:18 -0800
commit146e9d5e4d9a9a4f33d9ccd47a901980972b7ab9 (patch)
tree534d2389e2d701819597cd0b56130a2551b41bfb /indra/newview/llpanelimcontrolpanel.cpp
parent130214c766763855b733c9b5d4e177afe0c39865 (diff)
Support returning full_name (and SLID) for LLCacheName::get() calls
Changed callback signature to full_name instead of first_name,last_name Eliminated all calls to legacy (non-signal/non-boost-bind) lookup mechanism Change Pay dialog names to SLURL links Tweaked layout of Pay Resident and Pay via Object floaters to make SLURLs fit Consolidate name first + " " + last concatenation in LLCacheName::buildFullName() Reviewed with Kelly
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index a334eb9d68..a39fe64767 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -164,7 +164,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);
}
@@ -213,7 +213,8 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
else
{
// If the participant is an avatar, fetch the currect name
- gCacheName->get(mAvatarID, FALSE, boost::bind(&LLPanelIMControlPanel::nameUpdatedCallback, this, _1, _2, _3, _4));
+ gCacheName->get(mAvatarID, false,
+ boost::bind(&LLPanelIMControlPanel::onNameCache, this, _1, _2, _3));
}
}
@@ -229,14 +230,11 @@ void LLPanelIMControlPanel::changed(U32 mask)
}
}
-void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group)
+void LLPanelIMControlPanel::onNameCache(const LLUUID& id, const std::string& full_name, bool is_group)
{
if ( id == mAvatarID )
{
- std::string avatar_name;
- avatar_name.assign(first);
- avatar_name.append(" ");
- avatar_name.append(last);
+ std::string avatar_name = full_name;
getChild<LLTextBox>("avatar_name")->setValue(avatar_name);
getChild<LLTextBox>("avatar_name")->setToolTip(avatar_name);
}