summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-02-08 14:55:30 -0800
committerJames Cook <james@lindenlab.com>2010-02-08 14:55:30 -0800
commit42176145c9e81dd99b65f88152df50a7b3ccf834 (patch)
treebfca296db7fd5bbe793652dfecc12ba396dd2c25 /indra/newview/lltoolpie.cpp
parent33e613531f929b5bce04c11a355085fe5ea92997 (diff)
Converted names build from avatar object LLNameValue pairs to SLID
Added temporary getDisplayName() to LLCacheName Moved temporary placeholder display names into LLCacheName Eliminated rarely used LLAgentUI::buildName in favor of buildFullName Standardized buildFullName capitalization
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index bf1e307d71..fa1c99ece7 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -854,23 +854,38 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
|| !existing_inspector->getVisible()
|| existing_inspector->getKey()["avatar_id"].asUUID() != hover_object->getID())
{
- std::string avatar_name;
- LLNameValue* firstname = hover_object->getNVPair("FirstName");
- LLNameValue* lastname = hover_object->getNVPair("LastName");
- if (firstname && lastname)
+ // IDEVO JAMESDEBUG try to get display name + SLID
+ std::string final_name;
+ std::string full_name;
+ if (!gCacheName->getFullName(hover_object->getID(), full_name))
{
- avatar_name = llformat("%s %s", firstname->getString(), lastname->getString());
+ LLNameValue* firstname = hover_object->getNVPair("FirstName");
+ LLNameValue* lastname = hover_object->getNVPair("LastName");
+ if (firstname && lastname)
+ {
+ full_name = LLCacheName::buildFullName(
+ firstname->getString(), lastname->getString());
+ }
+ else
+ {
+ full_name = LLTrans::getString("TooltipPerson");
+ }
+ }
+ std::string display_name;
+ if (gCacheName->getDisplayName(hover_object->getID(), display_name))
+ {
+ final_name = display_name + " (" + full_name + ")";
}
else
{
- avatar_name = LLTrans::getString("TooltipPerson");
+ final_name = full_name;
}
-
+
// *HACK: We may select this object, so pretend it was clicked
mPick = mHoverPick;
LLInspector::Params p;
p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
- p.message(avatar_name);
+ p.message(final_name);
p.image.name("Inspector_I");
p.click_callback(boost::bind(showAvatarInspector, hover_object->getID()));
p.visible_time_near(6.f);