From b944a4792762bf61b7837a29c8580c9823c9670b Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 28 May 2010 09:59:47 -0700 Subject: DEV-50013 Script memory floater uses usernames --- indra/newview/llfloaterscriptlimits.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterscriptlimits.cpp') 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("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::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) { -- cgit v1.2.3