diff options
author | James Cook <james@lindenlab.com> | 2010-05-28 09:59:47 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-05-28 09:59:47 -0700 |
commit | b944a4792762bf61b7837a29c8580c9823c9670b (patch) | |
tree | 8657e552bbbe5f2880c358a01759f0a6bbf5f167 /indra | |
parent | 3bbb622731b2a6a29fc6576dcf4885527d813699 (diff) |
DEV-50013 Script memory floater uses usernames
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmessage/llavatarnamecache.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterscriptlimits.cpp | 20 |
2 files changed, 19 insertions, 3 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 4b41c7e5b1..0c577053a3 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -417,7 +417,7 @@ void LLAvatarNameCache::requestNamesViaLegacy() // invoked below. This should never happen in practice. sPendingQueue[agent_id] = now; - gCacheName->get(agent_id, false, + gCacheName->get(agent_id, false, // legacy compatibility boost::bind(&LLAvatarNameCache::legacyNameCallback, _1, _2, _3)); } diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index bd31181e5a..0149ead92e 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -34,6 +34,8 @@ #include "llviewerprecompiledheaders.h" #include "llfloaterscriptlimits.h" +// library includes +#include "llavatarnamecache.h" #include "llsdutil.h" #include "llsdutil_math.h" #include "message.h" @@ -599,7 +601,7 @@ void LLPanelScriptLimitsRegionMemory::setErrorStatus(U32 status, const std::stri // callback from the name cache with an owner name to add to the list void LLPanelScriptLimitsRegionMemory::onNameCache( const LLUUID& id, - const std::string& name) + const std::string& full_name) { LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list"); if(!list) @@ -607,6 +609,16 @@ void LLPanelScriptLimitsRegionMemory::onNameCache( return; } + std::string name; + if (LLAvatarNameCache::useDisplayNames()) + { + name = LLCacheName::buildUsername(full_name); + } + else + { + name = full_name; + } + std::vector<LLSD>::iterator id_itor; for (id_itor = mObjectListItems.begin(); id_itor != mObjectListItems.end(); ++id_itor) { @@ -707,7 +719,11 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) } else { - name_is_cached = gCacheName->getFullName(owner_id, owner_buf); + name_is_cached = gCacheName->getFullName(owner_id, owner_buf); // username + if (LLAvatarNameCache::useDisplayNames()) + { + owner_buf = LLCacheName::buildUsername(owner_buf); + } } if(!name_is_cached) { |