summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llurlentry.cpp65
-rw-r--r--indra/llui/llurlentry.h1
-rw-r--r--indra/llui/tests/llurlentry_stub.cpp7
3 files changed, 10 insertions, 63 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 0bbf1fe084..0b68b66ff9 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -312,66 +312,13 @@ LLUrlEntryAgent::LLUrlEntryAgent()
}
// IDEVO demo code
-static std::string clean_name(const std::string& full_name)
+std::string LLUrlEntryAgent::buildName(const LLUUID& id, const std::string& full_name)
{
- std::string displayname;
- if (full_name == "miyazaki23") // IDEVO demo code
- {
- // miyazaki
- displayname += (char)(0xE5);
- displayname += (char)(0xAE);
- displayname += (char)(0xAE);
- displayname += (char)(0xE5);
- displayname += (char)(0xB4);
- displayname += (char)(0x8E);
- // hayao
- displayname += (char)(0xE9);
- displayname += (char)(0xA7);
- displayname += (char)(0xBF);
- // san
- displayname += (char)(0xE3);
- displayname += (char)(0x81);
- displayname += (char)(0x95);
- displayname += (char)(0xE3);
- displayname += (char)(0x82);
- displayname += (char)(0x93);
- }
- else if (full_name == "Jim Linden")
- {
- displayname = "Jos";
- displayname += (char)(0xC3);
- displayname += (char)(0xA9);
- displayname += " Sanchez";
- }
- else if (full_name == "James Linden")
- {
- displayname = "James Cook";
- }
- else if (full_name == "Hamilton Linden")
- {
- displayname = "Hamilton Hitchings";
- }
- else if (full_name == "Rome Linden")
- {
- displayname = "Rome Portlock";
- }
- else if (full_name == "M Linden")
- {
- displayname = "Mark Kingdon";
- }
- else if (full_name == "T Linden")
- {
- displayname = "Tom Hale";
- }
- else if (full_name == "Callen Linden")
- {
- displayname = "Christina Allen";
- }
-
std::string final;
- if (!displayname.empty())
+ std::string display_name;
+ if (gCacheName->getDisplayName(id, display_name))
{
- final = displayname + " (" + full_name + ")";
+ final = display_name + " (" + full_name + ")";
}
else
{
@@ -384,7 +331,7 @@ void LLUrlEntryAgent::onNameCache(const LLUUID& id,
const std::string& full_name,
bool is_group)
{
- std::string final = clean_name(full_name);
+ std::string final = buildName(id, full_name);
// received the agent name from the server - tell our observers
callObservers(id.asString(), final);
}
@@ -412,7 +359,7 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
}
else if (gCacheName->getFullName(agent_id, full_name))
{
- return clean_name(full_name);
+ return buildName(agent_id, full_name);
}
else
{
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index e6844b595c..77802957a3 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -170,6 +170,7 @@ public:
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
private:
void onNameCache(const LLUUID& id, const std::string& full_name, bool is_group);
+ std::string buildName(const LLUUID& id, const std::string& full_name);
};
///
diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp
index 30bab1eb91..35c49fc37f 100644
--- a/indra/llui/tests/llurlentry_stub.cpp
+++ b/indra/llui/tests/llurlentry_stub.cpp
@@ -36,11 +36,10 @@ BOOL LLCacheName::getFullName(const LLUUID& id, std::string& fullname)
return TRUE;
}
-BOOL LLCacheName::getName(const LLUUID& id, std::string& first, std::string& last)
+bool LLCacheName::getDisplayName(const LLUUID& id, std::string& display_name)
{
- first = "Lynx";
- last = "Linden";
- return TRUE;
+ display_name = "";
+ return false;
}
BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)