From a5705bd459ca3a517cc5d78431bc5a1ad35c39b3 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 15 Aug 2013 00:06:09 -0400 Subject: [PATCH] IRC Feature Request: Ability to show only legacy names for speakers (in Adv. Chat->Chat UI preferences) --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/ascentprefschat.cpp | 2 ++ indra/newview/ascentprefschat.h | 1 + indra/newview/llspeakers.cpp | 6 +++++- .../xui/en-us/panel_preferences_ascent_chat.xml | 1 + 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7e03bc066..146bcf21a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -718,6 +718,17 @@ Value 1 + LiruLegacySpeakerNames + + Comment + Whether all lists of speakers use legacy names, or your desired way of displaying names. + Persist + 1 + Type + Boolean + Value + 0 + LiruMapShowAvCount Comment diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp index 16202e813..07eb9f7f9 100644 --- a/indra/newview/ascentprefschat.cpp +++ b/indra/newview/ascentprefschat.cpp @@ -297,6 +297,7 @@ void LLPrefsAscentChat::refreshValues() mOneLineConfButt = gSavedSettings.getBOOL("UseConciseConferenceButtons"); mOnlyComm = gSavedSettings.getBOOL("CommunicateSpecificShortcut"); mItalicizeActions = gSavedSettings.getBOOL("LiruItalicizeActions"); + mLegacySpeakerNames = gSavedSettings.getBOOL("LiruILegacySpeakerNames"); //Autoresponse ------------------------------------------------------------------------ mIMResponseAnyoneItemID = gSavedPerAccountSettings.getString("AutoresponseAnyoneItemID"); @@ -534,6 +535,7 @@ void LLPrefsAscentChat::cancel() gSavedSettings.setBOOL("UseConciseConferenceButtons", mOneLineConfButt); gSavedSettings.setBOOL("CommunicateSpecificShortcut", mOnlyComm); gSavedSettings.setBOOL("LiruItalicizeActions", mItalicizeActions); + gSavedSettings.setBOOL("LiruILegacySpeakerNames", mLegacySpeakerNames); //Autoresponse ------------------------------------------------------------------------ gSavedPerAccountSettings.setString("AutoresponseAnyoneItemID", mIMResponseAnyoneItemID); diff --git a/indra/newview/ascentprefschat.h b/indra/newview/ascentprefschat.h index 38fc2d8c8..5e0ecd707 100644 --- a/indra/newview/ascentprefschat.h +++ b/indra/newview/ascentprefschat.h @@ -86,6 +86,7 @@ protected: bool mOneLineConfButt; bool mOnlyComm; bool mItalicizeActions; + bool mLegacySpeakerNames; //Autoresponse ------------------------------------------------------------------------ std::string mIMResponseAnyoneItemID; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index fa4313ebd..0f15435dc 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -88,7 +88,11 @@ void LLSpeaker::lookupName() void LLSpeaker::onNameCache(const LLAvatarName& full_name) { - LLAvatarNameCache::getPNSName(full_name, mDisplayName); + static const LLCachedControl legacy_name("LiruLegacySpeakerNames"); + if (legacy_name) + mDisplayName = gCacheName->cleanFullName(full_name.getLegacyName()); + else + LLAvatarNameCache::getPNSName(full_name, mDisplayName); } bool LLSpeaker::isInVoiceChannel() diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml index 3b2faccef..a3dedff07 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml @@ -55,6 +55,7 @@ +