Use getAccountName() not a hack to get mUsername

meow-7.2.2
Cinders 2013-08-01 16:05:10 -06:00
parent cc6c02eca9
commit 717b66c43b
3 changed files with 3 additions and 15 deletions

View File

@ -217,10 +217,7 @@ std::string LLAvatarName::getDisplayName() const
}
}
// <FS:CR> Get the true username
//std::string LLAvatarName::getUserName() const
std::string LLAvatarName::getUserName(bool true_username) const
// </FS:CR>
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;
}
}
// <FS:CR> Get the true username
else if (true_username && !mUsername.empty())
{
name = mUsername;
}
// </FS:CR>
else
{
name = mLegacyFirstName + " " + mLegacyLastName;

View File

@ -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
// <FS:CR> Get the true username
// std::string getUserName() const;
std::string getUserName(bool true_username = false) const;
// </FS:CR>
std::string getUserName() const;
// Returns "james.linden" or the legacy name for very old names
std::string getAccountName() const { return mUsername; }

View File

@ -2968,7 +2968,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
// </FS:CR>
// <FS:CR> 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());
}