diff options
author | simon <none@none> | 2013-11-25 09:17:29 -0800 |
---|---|---|
committer | simon <none@none> | 2013-11-25 09:17:29 -0800 |
commit | 5756b7b3d05ce330e9877650ba6af04aaa4da49d (patch) | |
tree | a1668748b931f0b0a9bd2df80aa24b1c156e8f9e /indra/llcommon/llavatarname.cpp | |
parent | f1be57cd30489902e44d7843703a39987f379c69 (diff) | |
parent | 1ae4d45337b380213112183f153a631d4c3f3289 (diff) |
Merge - doh!
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 |