diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmessage/llavatarnamecache.cpp | 17 | ||||
-rw-r--r-- | indra/llui/llurlentry.cpp | 25 |
2 files changed, 25 insertions, 17 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 610bc58057..6dac25cd63 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -145,14 +145,15 @@ bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name) return true; } - std::string full_name; - if (gCacheName->getFullName(agent_id, full_name)) - { - av_name->mSLID = slid_from_full_name(full_name); - av_name->mDisplayName = full_name; - av_name->mBadge = "Generic_Person"; - return true; - } + // JAMESDEBUG Enable when we turn on display names. + //std::string full_name; + //if (gCacheName->getFullName(agent_id, full_name)) + //{ + // av_name->mSLID = slid_from_full_name(full_name); + // av_name->mDisplayName = full_name; + // av_name->mBadge = "Generic_Person"; + // return true; + //} return false; } diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index dbfac63a72..ef48f6cd4f 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -326,12 +326,18 @@ void LLUrlEntryAgent::onNameCache(const LLUUID& id, { // IDEVO demo code LLAvatarName av_name; - LLAvatarNameCache::get(id, &av_name); - std::string label = av_name.mDisplayName + " (" + av_name.mSLID + ")"; - // use custom icon if available - std::string icon = (!av_name.mBadge.empty() ? av_name.mBadge : mIcon); - // received the agent name from the server - tell our observers - callObservers(id.asString(), label, icon); + if (LLAvatarNameCache::get(id, &av_name)) + { + std::string label = av_name.mDisplayName + " (" + av_name.mSLID + ")"; + // use custom icon if available + std::string icon = (!av_name.mBadge.empty() ? av_name.mBadge : mIcon); + // received the agent name from the server - tell our observers + callObservers(id.asString(), label, icon); + } + else + { + callObservers(id.asString(), full_name, mIcon); + } } std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCallback &cb) @@ -358,9 +364,10 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa else if (gCacheName->getFullName(agent_id, full_name)) { LLAvatarName av_name; - LLAvatarNameCache::get(agent_id, &av_name); - std::string label = av_name.mDisplayName + " (" + av_name.mSLID + ")"; - return label; + if (LLAvatarNameCache::get(agent_id, &av_name)) + return av_name.mDisplayName + " (" + av_name.mSLID + ")"; + else + return full_name; } else { |