diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2010-01-13 16:55:23 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2010-01-13 16:55:23 +0200 |
commit | d40c4f9b8e6ce320dfee39c2ee9b5cbfdfda1392 (patch) | |
tree | 4bd10e0a2cd9942b0701ce2c9d72d613edefa673 /indra/newview | |
parent | 5eb5ab13ba5ed4c5470e467c4d46ce401c07bf7d (diff) |
fixed EXT-4073 [BSI] Shouting is malformed in plain chat mode
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llchathistory.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llfloaterchat.cpp | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index cda3e3a419..4f2dbe9fb1 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -500,6 +500,9 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ style_params.font.size(font_size); style_params.font.style(input_append_params.font.style); + //whether to show colon after a name in header copy/past and in plain text mode + bool show_colon = chat.mChatType != CHAT_TYPE_SHOUT && chat.mChatType != CHAT_TYPE_WHISPER; + if (use_plain_text_chat_history) { mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params); @@ -512,11 +515,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ LLStyle::Params link_params(style_params); link_params.fillFrom(LLStyleMap::instance().lookupAgent(chat.mFromID)); // Convert the name to a hotlink and add to message. - mEditor->appendText(chat.mFromName + ": ", false, link_params); + mEditor->appendText(chat.mFromName + (show_colon ? ": " : " "), false, link_params); } else { - mEditor->appendText(chat.mFromName + ": ", false, style_params); + mEditor->appendText(chat.mFromName + (show_colon ? ": " : " "), false, style_params); } } } @@ -562,7 +565,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ std::string header_text = "[" + chat.mTimeStr + "] "; if (utf8str_trim(chat.mFromName).size() != 0 && chat.mFromName != SYSTEM_FROM) - header_text += chat.mFromName + ": "; + header_text += chat.mFromName + (show_colon ? ": " : " "); mEditor->appendWidget(p, header_text, false); mLastFromName = chat.mFromName; diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 8f91424f59..18b9f0484f 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -190,7 +190,14 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) { if (log_to_file && (gSavedPerAccountSettings.getBOOL("LogChat"))) { - LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText); + if (chat.mChatType != CHAT_TYPE_WHISPER && chat.mChatType != CHAT_TYPE_SHOUT) + { + LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText); + } + else + { + LLLogChat::saveHistory("chat", "", chat.mFromID, chat.mFromName + " " + chat.mText); + } } LLColor4 color = get_text_color(chat); |