summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-03-08 13:39:22 -0800
committerJames Cook <james@lindenlab.com>2010-03-08 13:39:22 -0800
commit3d074fa20167a7c06f00c394481060e3d7101b11 (patch)
tree13aed94badddd38f7dc9d6dde18ac88080fadbf4 /indra/newview/llvoavatar.cpp
parent5f9dd335e6449c85d19b44166ad57b3793922b80 (diff)
Simplify name tag prefs and put SLID on top of display name
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp85
1 files changed, 40 insertions, 45 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f7df0dc2cf..b56e4d3d2e 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2808,6 +2808,35 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
clearNameTag();
+ if (is_away || is_muted || is_busy || is_appearance)
+ {
+ std::string line;
+ if (is_away)
+ {
+ line += LLTrans::getString("AvatarAway");
+ line += ", ";
+ }
+ if (is_busy)
+ {
+ line += LLTrans::getString("AvatarBusy");
+ line += ", ";
+ }
+ if (is_muted)
+ {
+ line += LLTrans::getString("AvatarMuted");
+ line += ", ";
+ }
+ if (is_appearance)
+ {
+ line += LLTrans::getString("AvatarEditingAppearance");
+ line += ", ";
+ }
+ // trim last ", "
+ line.resize( line.length() - 2 );
+ addNameTagLine(line, name_tag_color, LLFontGL::NORMAL,
+ LLFontGL::getFontSansSerifSmall());
+ }
+
if (sRenderGroupTitles
&& title && title->getString() && title->getString()[0] != '\0')
{
@@ -2832,61 +2861,27 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
// Might be blank if name not available yet, that's OK
- if (show_display_names)
- {
- addNameTagLine(av_name.mDisplayName, name_tag_color, LLFontGL::NORMAL,
- LLFontGL::getFontSansSerifBig());
- }
if (show_slids)
{
addNameTagLine(av_name.mSLID, name_tag_color, LLFontGL::NORMAL,
LLFontGL::getFontSansSerif());
}
- }
- else
- {
- if (show_display_names || show_slids)
+ if (show_display_names)
{
-
- static LLUICachedControl<bool> small_avatar_names("SmallAvatarNames");
- const LLFontGL* font =
- (small_avatar_names ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifBig() );
- std::string full_name =
- LLCacheName::buildFullName( firstname->getString(), lastname->getString() );
- addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font);
+ addNameTagLine(av_name.mDisplayName, name_tag_color, LLFontGL::NORMAL,
+ LLFontGL::getFontSansSerifBig());
}
}
-
- static LLUICachedControl<bool> show_status("NameTagShowStatus");
- if (show_status
- && (is_away || is_muted || is_busy || is_appearance) )
+ else
{
- std::string line;
- if (is_away)
- {
- line += LLTrans::getString("AvatarAway");
- line += ", ";
- }
- if (is_busy)
- {
- line += LLTrans::getString("AvatarBusy");
- line += ", ";
- }
- if (is_muted)
- {
- line += LLTrans::getString("AvatarMuted");
- line += ", ";
- }
- if (is_appearance)
- {
- line += LLTrans::getString("AvatarEditingAppearance");
- line += ", ";
- }
- // trim last ", "
- line.resize( line.length() - 2 );
- addNameTagLine(line, name_tag_color, LLFontGL::NORMAL,
- LLFontGL::getFontSansSerifSmall());
+ static LLUICachedControl<bool> small_avatar_names("SmallAvatarNames");
+ const LLFontGL* font =
+ (small_avatar_names ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifBig() );
+ std::string full_name =
+ LLCacheName::buildFullName( firstname->getString(), lastname->getString() );
+ addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font);
}
+
mNameAway = is_away;
mNameBusy = is_busy;
mNameMute = is_muted;