summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llmessage/llavatarnamecache.cpp2
-rw-r--r--indra/newview/llfloaterscriptlimits.cpp20
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)
{