diff options
author | dolphin <dolphin@lindenlab.com> | 2014-03-10 13:06:06 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2014-03-10 13:06:06 -0700 |
commit | 34c12d009c232917732e6eeb452da7e76b2ee12e (patch) | |
tree | 847155313ac7588a23f3ee71d3ee8f3ab30580c9 /indra/llcommon/llavatarname.cpp | |
parent | 7b9817cbcc5acab58d9d4355984b429850bd3ef8 (diff) | |
parent | cb91708332b8b8ddfe27808602ec5f43f11c24c2 (diff) |
Merge
Diffstat (limited to 'indra/llcommon/llavatarname.cpp')
-rwxr-xr-x | indra/llcommon/llavatarname.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp index 642bd82e90..d12f157910 100755 --- a/indra/llcommon/llavatarname.cpp +++ b/indra/llcommon/llavatarname.cpp @@ -44,6 +44,7 @@ static const std::string DISPLAY_NAME_EXPIRES("display_name_expires"); static const std::string DISPLAY_NAME_NEXT_UPDATE("display_name_next_update"); bool LLAvatarName::sUseDisplayNames = true; +bool LLAvatarName::sUseUsernames = true; // Minimum time-to-live (in seconds) for a name entry. // Avatar name should always guarantee to expire reasonably soon by default @@ -81,6 +82,16 @@ bool LLAvatarName::useDisplayNames() return sUseDisplayNames; } +void LLAvatarName::setUseUsernames(bool use) +{ + sUseUsernames = use; +} + +bool LLAvatarName::useUsernames() +{ + return sUseUsernames; +} + LLSD LLAvatarName::asLLSD() const { LLSD sd; @@ -168,7 +179,11 @@ std::string LLAvatarName::getCompleteName() const } else { - name = mDisplayName + " (" + mUsername + ")"; + name = mDisplayName; + if(sUseUsernames) + { + name += " (" + mUsername + ")"; + } } } else |