diff options
author | Kent Quirk <q@lindenlab.com> | 2010-03-26 11:38:42 -0400 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2010-03-26 11:38:42 -0400 |
commit | 1ed3117a6d3d40788245d2b28f2ed7a82380b4bb (patch) | |
tree | 9157a44eabac3bb169acb0d9a8e272b71754b419 /indra/newview/llchathistory.cpp | |
parent | d2cbc6c5b646e334e706e51faafbaa738b0d10a9 (diff) |
Backed out changeset 686628355e4a as it caused a crash.
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r-- | indra/newview/llchathistory.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 000fb62431..efdfbb8d20 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -447,6 +447,7 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) : LLUICtrl(p), mMessageHeaderFilename(p.message_header), mMessageSeparatorFilename(p.message_separator), + mMessagePlaintextSeparatorFilename(p.message_plaintext_separator), mLeftTextPad(p.left_text_pad), mRightTextPad(p.right_text_pad), mLeftWidgetPad(p.left_widget_pad), @@ -534,6 +535,12 @@ LLView* LLChatHistory::getSeparator() return separator; } +LLView* LLChatHistory::getPlaintextSeparator() +{ + LLPanel* separator = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>(mMessagePlaintextSeparatorFilename, NULL, LLPanel::child_registry_t::instance()); + return separator; +} + LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style_params) { LLChatHistoryHeader* header = LLChatHistoryHeader::createInstance(mMessageHeaderFilename); @@ -632,6 +639,15 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (use_plain_text_chat_history) { + // append plaintext separator + LLView* separator = getPlaintextSeparator(); + LLInlineViewSegment::Params p; + p.force_newline = true; + p.left_pad = mLeftWidgetPad; + p.right_pad = mRightWidgetPad; + p.view = separator; + mEditor->appendWidget(p, "\n", false); + mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params); if (utf8str_trim(chat.mFromName).size() != 0) |