summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-03-16 18:03:05 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-03-16 18:03:05 +0200
commit282ad9417561d0d1df7e2bf81ef96caf53ff50d1 (patch)
treeea547f80b6fe34423f238e0f088b397afe7c13c4 /indra/newview
parent59a682784793f64df88e666b66c6ed8e930dcc90 (diff)
MAINT-4974 FIXED Complete name should be used in LLAvatarActions::buildResidentsString only when building name string for share confirmation dialogs
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llavataractions.cpp14
-rwxr-xr-xindra/newview/llavataractions.h2
2 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 0e30c079ff..8dc8a2ff20 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -745,7 +745,7 @@ namespace action_give_inventory
}
std::string residents;
- LLAvatarActions::buildResidentsString(avatar_names, residents);
+ LLAvatarActions::buildResidentsString(avatar_names, residents, true);
std::string items;
build_items_string(inventory_selected_uuids, items);
@@ -777,7 +777,7 @@ namespace action_give_inventory
}
// static
-void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string)
+void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string, bool complete_name)
{
llassert(avatar_names.size() > 0);
@@ -785,7 +785,15 @@ void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_name
const std::string& separator = LLTrans::getString("words_separator");
for (std::vector<LLAvatarName>::const_iterator it = avatar_names.begin(); ; )
{
- residents_string.append((*it).getCompleteName());
+ if(complete_name)
+ {
+ residents_string.append((*it).getCompleteName());
+ }
+ else
+ {
+ residents_string.append((*it).getDisplayName());
+ }
+
if (++it == avatar_names.end())
{
break;
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 85813f2152..bd0ac24e93 100755
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -221,7 +221,7 @@ public:
* @param avatar_names - a vector of given avatar names from which resulting string is built
* @param residents_string - the resulting string
*/
- static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string);
+ static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string, bool complete_name = false);
/**
* Builds a string of residents' display names separated by "words_separator" string.