diff options
| author | James Cook <james@lindenlab.com> | 2010-02-11 16:39:15 -0800 |
|---|---|---|
| committer | James Cook <james@lindenlab.com> | 2010-02-11 16:39:15 -0800 |
| commit | c2373fb5a6b08b2c32e5f93fa67b25f669e8b47f (patch) | |
| tree | 1d699db4ebe531cdeeffb7dd16dee4e565d7da26 /indra/llui/llurlentry.cpp | |
| parent | 9dd7924b19651abf393f7b0dee632904a6b8e52a (diff) | |
Created stub LLAvatarNameCache for display name lookup, as
well as LLAvatarName base data object.
Reviewed with Kelly.
Diffstat (limited to 'indra/llui/llurlentry.cpp')
| -rw-r--r-- | indra/llui/llurlentry.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 0b68b66ff9..dae2c44f08 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -35,6 +35,7 @@ #include "llurlentry.h" #include "lluri.h" +#include "llavatarnamecache.h" #include "llcachename.h" #include "lltrans.h" #include "lluicolortable.h" @@ -312,26 +313,19 @@ LLUrlEntryAgent::LLUrlEntryAgent() } // IDEVO demo code -std::string LLUrlEntryAgent::buildName(const LLUUID& id, const std::string& full_name) +std::string LLUrlEntryAgent::buildName(const LLUUID& id) { - std::string final; - std::string display_name; - if (gCacheName->getDisplayName(id, display_name)) - { - final = display_name + " (" + full_name + ")"; - } - else - { - final = full_name; - } - return final; + // JAMESDEBUG HACK: assume name is there + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); + return av_name.mDisplayName + " (" + av_name.mSLID + ")"; } void LLUrlEntryAgent::onNameCache(const LLUUID& id, const std::string& full_name, bool is_group) { - std::string final = buildName(id, full_name); + std::string final = buildName(id); // received the agent name from the server - tell our observers callObservers(id.asString(), final); } @@ -359,7 +353,7 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa } else if (gCacheName->getFullName(agent_id, full_name)) { - return buildName(agent_id, full_name); + return buildName(agent_id); } else { |
