From c75f4ffb497ebce0ad8661e24aa521686e44f52f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 28 Jan 2016 13:39:23 +0100 Subject: [PATCH] Fix broken stuff in FSChatHistory for chat headers: * Load the grid name the correct way * Enable info-button for radar alert messages * Stop adding extra parenthesis for names where the avatar ID couldn't be parsed --- indra/newview/fschathistory.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index a20202e8cc..ea839e4c98 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -435,10 +435,18 @@ public: || (mSourceType == CHAT_SOURCE_SYSTEM && mType != CHAT_TYPE_RADAR) || mAvatarID.isNull()) { - mFrom = LLTrans::getString("CURRENT_GRID"); - if(!chat.mFromName.empty() && (mFrom != chat.mFromName)) + if (mSourceType == CHAT_SOURCE_UNKNOWN) { - mFrom += " (" + chat.mFromName + ")"; + // Avatar names may come up as CHAT_SOURCE_UNKNOWN - don't append the grid name in that case + mFrom = chat.mFromName; + } + else + { + mFrom = LLTrans::getString("SECOND_LIFE"); // Will automatically be substituted! + if (!chat.mFromName.empty() && (mFrom != chat.mFromName)) + { + mFrom += " (" + chat.mFromName + ")"; + } } mUserNameTextBox->setValue(mFrom); updateMinUserNameWidth(); @@ -492,7 +500,6 @@ public: mUserNameTextBox->setValue(mFrom); updateMinUserNameWidth(); } -// [/RLVa:KB] } else { @@ -714,7 +721,7 @@ protected: void showInfoCtrl() { - const bool isVisible = !mAvatarID.isNull() && !mFrom.empty() && CHAT_SOURCE_SYSTEM != mSourceType; + const bool isVisible = !mAvatarID.isNull() && !mFrom.empty() && (CHAT_SOURCE_SYSTEM != mSourceType || mType == CHAT_TYPE_RADAR); // [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f if (isVisible && mShowInfoCtrl) // [/RLVa:KB]