From d2cbc6c5b646e334e706e51faafbaa738b0d10a9 Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Fri, 26 Mar 2010 10:43:07 -0400 Subject: Fix for EXT-3818 -- back out some code that was put in for EXT-6373, but overreached. --- indra/newview/llchathistory.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index efdfbb8d20..000fb62431 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -447,7 +447,6 @@ 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), @@ -535,12 +534,6 @@ LLView* LLChatHistory::getSeparator() return separator; } -LLView* LLChatHistory::getPlaintextSeparator() -{ - LLPanel* separator = LLUICtrlFactory::getInstance()->createFromFile(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); @@ -639,15 +632,6 @@ 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) -- cgit v1.2.3 From 1ed3117a6d3d40788245d2b28f2ed7a82380b4bb Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Fri, 26 Mar 2010 11:38:42 -0400 Subject: Backed out changeset 686628355e4a as it caused a crash. --- indra/newview/llchathistory.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llchathistory.cpp') 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(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) -- cgit v1.2.3 From 32253813b4d885f2a62a02f55ab249bca01c6cdf Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Fri, 26 Mar 2010 17:05:29 -0400 Subject: EXT-3818 -- absolute minimal fix for Viewer 2, can be better fixed in 2.1. Previous proposed fix caused a crash on at least one machine, too risky. --- indra/newview/llchathistory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index efdfbb8d20..f5faeca126 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -646,7 +646,8 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL p.left_pad = mLeftWidgetPad; p.right_pad = mRightWidgetPad; p.view = separator; - mEditor->appendWidget(p, "\n", false); + //mEditor->appendWidget(p, "\n", false); // TODO: this is absolute minimal fix for EXT-3818 because it's late for 2.0 + mEditor->appendWidget(p, "", false); // This should be properly fixed in 2.1 mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params); -- cgit v1.2.3