summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateravatarpicker.cpp
diff options
context:
space:
mode:
authorThomas Nelson <rider@lindenlab.com>2017-10-17 13:38:39 -0700
committerThomas Nelson <rider@lindenlab.com>2017-10-17 13:38:39 -0700
commit5754493cdcfeac76d0576abc19bdf5a03717780d (patch)
treee6db53ae1cd654f9b2a1a6b9ab47e01ea738ecef /indra/newview/llfloateravatarpicker.cpp
parentcc22ffc6d799544e8f2a9dfed6813081d908c88d (diff)
parent9c5becd67d7e6fe5f696dcae8690dd562b7b0449 (diff)
Merged lindenlab/viewer64 into default
Diffstat (limited to 'indra/newview/llfloateravatarpicker.cpp')
-rw-r--r--indra/newview/llfloateravatarpicker.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index c394eb815b..c5561fe011 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -496,6 +496,18 @@ void LLFloaterAvatarPicker::find()
std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
+ size_t separator_index = text.find_first_of(" ._");
+ if (separator_index != text.npos)
+ {
+ std::string first = text.substr(0, separator_index);
+ std::string last = text.substr(separator_index+1, text.npos);
+ LLStringUtil::trim(last);
+ if("Resident" == last)
+ {
+ text = first;
+ }
+ }
+
mQueryID.generate();
std::string url;
@@ -739,12 +751,13 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
if (search_results->isEmpty())
{
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = getChild<LLUICtrl>("Edit")->getValue().asString();
+ std::string name = "'" + getChild<LLUICtrl>("Edit")->getValue().asString() + "'";
LLSD item;
item["id"] = LLUUID::null;
item["columns"][0]["column"] = "name";
- item["columns"][0]["value"] = getString("not_found", map);
+ item["columns"][0]["value"] = name;
+ item["columns"][1]["column"] = "username";
+ item["columns"][1]["value"] = getString("not_found_text");
search_results->addElement(item);
search_results->setEnabled(false);
getChildView("ok_btn")->setEnabled(false);