summaryrefslogtreecommitdiff
path: root/indra
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
parent5f9dd335e6449c85d19b44166ad57b3793922b80 (diff)
Simplify name tag prefs and put SLID on top of display name
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llvoavatar.cpp85
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_general.xml11
3 files changed, 42 insertions, 65 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index cf8e238855..882430d5e3 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7168,17 +7168,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>NameTagShowStatus</key>
- <map>
- <key>Comment</key>
- <string>Show status (AFK, Busy) in name labels</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>RenderInitError</key>
<map>
<key>Comment</key>
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;
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index 39a597a372..08f8a24ac3 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -286,6 +286,7 @@
name="show_all_title_checkbox1"
tool_tip="Show group titles, like Officer or Member"
top_pad="5" />
+ <!--
<check_box
control_name="NameTagShowDisplayNames"
enabled_control="AvatarNameTagMode"
@@ -295,6 +296,7 @@
name="show_display_names"
tool_tip="Show display names, like José Sanchez"
top_pad="5" />
+ -->
<check_box
control_name="NameTagShowSLIDs"
enabled_control="AvatarNameTagMode"
@@ -304,15 +306,6 @@
name="show_slids"
tool_tip="Show SL ID, like bobsmith123"
top_pad="5" />
- <check_box
- control_name="NameTagShowStatus"
- enabled_control="AvatarNameTagMode"
- height="16"
- label="Status"
- left_delta="0"
- name="show_status"
- tool_tip="Show status, like AFK or Busy"
- top_pad="5" />
<text
type="string"
length="1"