summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorAlexanderP ProductEngine <apaschenko@productengine.com>2012-06-05 18:20:01 +0300
committerAlexanderP ProductEngine <apaschenko@productengine.com>2012-06-05 18:20:01 +0300
commit164e1073952060cf88a163945d6745934db62620 (patch)
treedde53006e831f47d9cbfe05f1ce05ffa2e963ead /indra/newview/llchathistory.cpp
parentf7f85dd0dda563a9fb49ed65b193a9ea98da9ba2 (diff)
CHUI-103 Added square brackets to a messages from Second Life in the plain text mode; changed the default colors of user's messages
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index c514261b60..cfc70a1b0e 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -693,6 +693,7 @@ void LLChatHistory::clear()
void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LLStyle::Params& input_append_params)
{
bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean();
+ bool square_brackets = false; // square brackets necessary for a system messages
llassert(mEditor);
if (!mEditor)
@@ -781,6 +782,8 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
// show timestamps and names in the compact mode
if (use_plain_text_chat_history)
{
+ square_brackets = chat.mFromName == SYSTEM_FROM;
+
LLStyle::Params timestamp_style(style_params);
// timestams showing
@@ -942,6 +945,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
message = chat.mFromName + message;
}
+ if (square_brackets)
+ {
+ message = "[" + message + "]";
+ }
+
mEditor->appendText(message, prependNewLineState, style_params);
prependNewLineState = false;
}