From 717b66c43be50824d9d2c139e166b5c13b0be2b8 Mon Sep 17 00:00:00 2001 From: Cinders Date: Thu, 1 Aug 2013 16:05:10 -0600 Subject: [PATCH] Use getAccountName() not a hack to get mUsername --- indra/llcommon/llavatarname.cpp | 11 +---------- indra/llcommon/llavatarname.h | 5 +---- indra/newview/llvoavatar.cpp | 2 +- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp index 3abdd5cd44..d50eca6792 100755 --- a/indra/llcommon/llavatarname.cpp +++ b/indra/llcommon/llavatarname.cpp @@ -217,10 +217,7 @@ std::string LLAvatarName::getDisplayName() const } } -// Get the true username -//std::string LLAvatarName::getUserName() const -std::string LLAvatarName::getUserName(bool true_username) const -// +std::string LLAvatarName::getUserName() const { std::string name; if (mLegacyLastName.empty() || (mLegacyLastName == "Resident")) @@ -236,12 +233,6 @@ std::string LLAvatarName::getUserName(bool true_username) const name = mLegacyFirstName; } } - // Get the true username - else if (true_username && !mUsername.empty()) - { - name = mUsername; - } - // else { name = mLegacyFirstName + " " + mLegacyLastName; diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 450ee8f8c3..89a222bb88 100755 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -85,10 +85,7 @@ public: // Returns "James Linden" or "bobsmith123 Resident" // Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name // Also used for backwards compatibility with systems like voice and muting - // Get the true username - // std::string getUserName() const; - std::string getUserName(bool true_username = false) const; - // + std::string getUserName() const; // Returns "james.linden" or the legacy name for very old names std::string getAccountName() const { return mUsername; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 61bd688bba..f1cb154138 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2968,7 +2968,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) // // Show user name as legacy name if selected - std::string username( show_legacynames ? av_name.getLegacyName() : av_name.getUserName(true) ); + std::string username( show_legacynames ? av_name.getLegacyName() : av_name.getAccountName() ); addNameTagLine(username, username_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall()); }