diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-03-06 14:42:48 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-03-06 14:42:48 -0500 |
commit | 015463c7313f93b178c517519d71889ab897361a (patch) | |
tree | 26dab56ffa84f78bfeca57e7166ff96e565572d3 /indra/llmessage | |
parent | 09a6daabd2c4281b071f9213906872ea8a744956 (diff) | |
parent | 08ed7f676f2ce38937a03c2a4e823e3564981264 (diff) |
merge
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llavatarname.cpp | 10 | ||||
-rw-r--r-- | indra/llmessage/llavatarname.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp index d2115ee499..7e1246f885 100644 --- a/indra/llmessage/llavatarname.cpp +++ b/indra/llmessage/llavatarname.cpp @@ -166,10 +166,10 @@ void LLAvatarName::setExpires(F64 expires) mExpires = LLFrameTimer::getTotalSeconds() + expires; } -std::string LLAvatarName::getCompleteName(bool use_parentheses) const +std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_complete_name) const { std::string name; - if (sUseDisplayNames) + if (sUseDisplayNames || force_use_complete_name) { if (mUsername.empty() || mIsDisplayNameDefault) { @@ -180,7 +180,7 @@ std::string LLAvatarName::getCompleteName(bool use_parentheses) const else { name = mDisplayName; - if(sUseUsernames) + if(sUseUsernames || force_use_complete_name) { if(use_parentheses) { @@ -215,9 +215,9 @@ std::string LLAvatarName::getLegacyName() const return name; } -std::string LLAvatarName::getDisplayName() const +std::string LLAvatarName::getDisplayName(bool force_use_display_name) const { - if (sUseDisplayNames) + if (sUseDisplayNames || force_use_display_name) { return mDisplayName; } diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h index 192f43f07c..20f7140797 100644 --- a/indra/llmessage/llavatarname.h +++ b/indra/llmessage/llavatarname.h @@ -65,7 +65,7 @@ public: // For normal names, returns "James Linden (james.linden)" // When display names are disabled returns just "James Linden" - std::string getCompleteName(bool use_parentheses = true) const; + std::string getCompleteName(bool use_parentheses = true, bool force_use_complete_name = false) const; // Returns "James Linden" or "bobsmith123 Resident" for backwards // compatibility with systems like voice and muting @@ -75,7 +75,7 @@ public: // "José Sanchez" or "James Linden", UTF-8 encoded Unicode // Takes the display name preference into account. This is truly the name that should // be used for all UI where an avatar name has to be used unless we truly want something else (rare) - std::string getDisplayName() const; + std::string getDisplayName(bool force_use_display_name = false) const; // Returns "James Linden" or "bobsmith123 Resident" // Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name |