From df7c60de357f960d19b43d4e4e438e523ae900f5 Mon Sep 17 00:00:00 2001 From: Salvatore La Bua Date: Sat, 28 Sep 2013 05:32:54 +0200 Subject: [PATCH] Add option to show Client tags on a new line The checkbox is available in Preferences > Vanity > Tags/Colors. Debug Setting: SLBDisplayClientTagOnNewLine --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/ascentprefsvan.cpp | 3 +++ indra/newview/ascentprefsvan.h | 1 + indra/newview/llvoavatar.cpp | 9 ++++++++- .../xui/de/panel_preferences_ascent_vanity.xml | 1 + .../xui/en-us/panel_preferences_ascent_vanity.xml | 7 ++++--- .../xui/es/panel_preferences_ascent_vanity.xml | 1 + .../xui/fr/panel_preferences_ascent_vanity.xml | 1 + 8 files changed, 30 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 240c181b8..50cc566dc 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -868,6 +868,17 @@ Found in Advanced->Rendering->Info Displays Value 0 + SLBDisplayClientTagOnNewLine + + Comment + Display the client tag on a new line + Persist + 1 + Type + Boolean + Value + 0 + LogShowHistoryLines Comment diff --git a/indra/newview/ascentprefsvan.cpp b/indra/newview/ascentprefsvan.cpp index 33a3a12be..a69c60aee 100644 --- a/indra/newview/ascentprefsvan.cpp +++ b/indra/newview/ascentprefsvan.cpp @@ -66,6 +66,7 @@ LLPrefsAscentVan::LLPrefsAscentVan() getChild("show_self_tag_color_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2)); getChild("customize_own_tag_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2)); getChild("show_friend_tag_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2)); + getChild("display_client_new_line_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2)); getChild("use_status_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2)); getChild("custom_tag_label_box")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitTextModified, this, _1, _2)); @@ -174,6 +175,7 @@ void LLPrefsAscentVan::refreshValues() mShowSelfClientTag = gSavedSettings.getBOOL("AscentShowSelfTag"); mShowSelfClientTagColor = gSavedSettings.getBOOL("AscentShowSelfTagColor"); mShowFriendsTag = gSavedSettings.getBOOL("AscentShowFriendsTag"); + mDisplayClientTagOnNewLine = gSavedSettings.getBOOL("SLBDisplayClientTagOnNewLine"); mCustomTagOn = gSavedSettings.getBOOL("AscentUseCustomTag"); mCustomTagLabel = gSavedSettings.getString("AscentCustomTagLabel"); mCustomTagColor = gSavedSettings.getColor4("AscentCustomTagColor"); @@ -246,6 +248,7 @@ void LLPrefsAscentVan::cancel() gSavedSettings.setBOOL("AscentShowSelfTag", mShowSelfClientTag); gSavedSettings.setBOOL("AscentShowSelfTagColor", mShowSelfClientTagColor); gSavedSettings.setBOOL("AscentShowFriendsTag", mShowFriendsTag); + gSavedSettings.setBOOL("SLBDisplayClientTagOnNewLine", mDisplayClientTagOnNewLine); gSavedSettings.setBOOL("AscentUseCustomTag", mCustomTagOn); gSavedSettings.setString("AscentCustomTagLabel", mCustomTagLabel); gSavedSettings.setColor4("AscentCustomTagColor", mCustomTagColor); diff --git a/indra/newview/ascentprefsvan.h b/indra/newview/ascentprefsvan.h index 5d0c6af44..77285b23d 100644 --- a/indra/newview/ascentprefsvan.h +++ b/indra/newview/ascentprefsvan.h @@ -71,6 +71,7 @@ protected: BOOL mShowSelfClientTag; BOOL mShowSelfClientTagColor; BOOL mShowFriendsTag; + BOOL mDisplayClientTagOnNewLine; BOOL mCustomTagOn; std::string mCustomTagLabel; LLColor4 mCustomTagColor; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a599df745..88ea18c52 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -564,6 +564,7 @@ SHClientTagMgr::SHClientTagMgr() gSavedSettings.getControl("AscentEstateOwnerColor")->getSignal()->connect(boost::bind(&LLVOAvatar::invalidateNameTags)); gSavedSettings.getControl("AscentFriendColor")->getSignal()->connect(boost::bind(&LLVOAvatar::invalidateNameTags)); gSavedSettings.getControl("AscentMutedColor")->getSignal()->connect(boost::bind(&LLVOAvatar::invalidateNameTags)); + gSavedSettings.getControl("SLBDisplayClientTagOnNewLine")->getSignal()->connect(boost::bind(&LLVOAvatar::invalidateNameTags)); //Following group of settings all actually manipulate the tag cache for agent avatar. Even if the tag system is 'disabled', we still allow an //entry to exist for the agent avatar. @@ -3060,6 +3061,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) LLNameValue *title = getNVPair("Title"); LLNameValue* firstname = getNVPair("FirstName"); LLNameValue* lastname = getNVPair("LastName"); + static const LLCachedControl display_client_new_line("SLBDisplayClientTagOnNewLine"); // Avatars must have a first and last name if (!firstname || !lastname) return; @@ -3282,7 +3284,12 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) else if(allow_nameplate_override && !mCCSAttachmentText.empty()) tag_format=mCCSAttachmentText; else - tag_format=sRenderGroupTitles ? "%g\n%f %l %t" : "%f %l %t"; + { + if(!display_client_new_line) + tag_format=sRenderGroupTitles ? "%g\n%f %l %t" : "%f %l %t"; + else + tag_format=sRenderGroupTitles ? "%g\n%f %l\n%t" : "%f %l\n%t"; + } // replace first name, last name and title typedef boost::tokenizer > tokenizer; diff --git a/indra/newview/skins/default/xui/de/panel_preferences_ascent_vanity.xml b/indra/newview/skins/default/xui/de/panel_preferences_ascent_vanity.xml index 5a808509c..c0dcbb781 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_ascent_vanity.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_ascent_vanity.xml @@ -24,6 +24,7 @@ + Label: diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml index afe08c144..59af05819 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml @@ -24,8 +24,9 @@ + - + Label: Color: @@ -33,7 +34,7 @@ - +