From 920d54297fc13a7a975ff4372f0c1559cf9cf199 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 25 Mar 2010 17:09:20 +0200 Subject: =?UTF-8?q?fixed=20major=20EXT-6500=20=E2=80=9CMessage=20Well=20co?= =?UTF-8?q?unter=20changes=20to=20'-1'=20after=20plain=20text=20chat=20was?= =?UTF-8?q?=20enabled=20while=20unresolved=20offer=20was=20in=20hided=20IM?= =?UTF-8?q?=20window=E2=80=9D,=20Added=20check=20to=20LLToastNotifyPanel?= =?UTF-8?q?=20destructor=20whether=20we=20should=20close=20notification=20?= =?UTF-8?q?since=20notification=20will=20be=20reused=20by=20IM=20floater?= =?UTF-8?q?=20when=20reload=20messages,=20the=20rule=20is:=20if=20LLToastN?= =?UTF-8?q?otifyPanel=20destroying=20but=20IM=20floater=20is=20exists=20?= =?UTF-8?q?=E2=80=93=20we=20shouldn't=20close=20notification.=20The=20prob?= =?UTF-8?q?lem=20is=20that=20notification=20was=20incorrectly=20deleted=20?= =?UTF-8?q?when=20IM=20floater=20reloads=20messages=20on=20chat=20log=20fr?= =?UTF-8?q?omat=20change=20event.=20reviewed=20by=20Vadim=20Savchuk=20at?= =?UTF-8?q?=20https://codereview.productengine.com/secondlife/r/80/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index efdfbb8d20..858ea334d1 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -751,7 +751,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (notification != NULL) { LLIMToastNotifyPanel* notify_box = new LLIMToastNotifyPanel( - notification); + notification, chat.mSessionID); //we can't set follows in xml since it broke toasts behavior notify_box->setFollowsLeft(); notify_box->setFollowsRight(); -- cgit v1.2.3 From 3318c8f09e5edb907712d626ea12c2cbd6136c50 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 25 Mar 2010 18:06:48 +0200 Subject: =?UTF-8?q?fixed=20EXT-3818=20=E2=80=9C[BSI]=20plain=20text=20chat?= =?UTF-8?q?=20has=20too=20much=20space=20between=20lines=E2=80=9D,=20To=20?= =?UTF-8?q?fix=20EXT-6373=20I=20added=20vertical=20padding=20between=20pos?= =?UTF-8?q?ts=20in=20plain-text=20and=20unified=20padding=20in=20default?= =?UTF-8?q?=20mode=20of=20IM/chat=20history.=20Now=20I'm=20backing=20out?= =?UTF-8?q?=20the=20changes=20to=20plain-text=20mode=20that=20led=20to=20E?= =?UTF-8?q?XT-3818.=20reviewed=20by=20Leyla=20Farazha=20at=20https://coder?= =?UTF-8?q?eview.productengine.com/secondlife/r/95/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- 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 858ea334d1..71e7ae7061 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 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 From 81582cb3764c7a0d3031f8259a4be9375fb1bd81 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 2 Apr 2010 13:15:50 +0300 Subject: Fixed normal bug EXT-5831(Do not apply font color to timestamps in chat history) - added new 'ChatTimestampColor' color setting, which is set to timestamps for chat history messages in text mode which are not from log. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/160/. --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 71e7ae7061..ec5e61f384 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -632,7 +632,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (use_plain_text_chat_history) { - mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params); + LLStyle::Params timestamp_style(style_params); + if (!message_from_log) + { + LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor"); + timestamp_style.color(timestamp_color); + timestamp_style.readonly_color(timestamp_color); + } + mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, timestamp_style); if (utf8str_trim(chat.mFromName).size() != 0) { -- cgit v1.2.3 From 32283a93e08a27e179486a5162367885131dffba Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 2 Apr 2010 13:36:58 +0300 Subject: Fixed normal bug EXT-6357 (SLapp for object chat does display an inspector) - added new LLUrlEntry to support 'secondlife:///app/objectim/{UUID}/' SLapps. Fixed passing the SLURL to inspect_remote_object floater. Reviewed by Vadim Savchuk, https://codereview.productengine.com/secondlife/r/158/ --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index ec5e61f384..68c31d87fa 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -93,7 +93,7 @@ public: payload["object_id"] = object_id; payload["owner_id"] = query_map["owner"]; payload["name"] = query_map["name"]; - payload["slurl"] = query_map["slurl"]; + payload["slurl"] = LLWeb::escapeURL(query_map["slurl"]); payload["group_owned"] = query_map["groupowned"]; LLFloaterReg::showInstance("inspect_remote_object", payload); return true; -- cgit v1.2.3 From 0bb3f144c0a6712a269246975635962b3b5f48d0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 7 Apr 2010 10:37:07 +0100 Subject: Backed out changeset 63b699f90efd --- indra/newview/llchathistory.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 1e404d611c..71e7ae7061 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -640,19 +640,20 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull()) { // for object IMs, create a secondlife:///app/objectim SLapp - std::string url = LLSLURL("objectim", chat.mFromID, "").getSLURLString(); + std::string url = LLSLURL::buildCommand("objectim", chat.mFromID, ""); url += "?name=" + chat.mFromName; url += "&owner=" + args["owner_id"].asString(); std::string slurl = args["slurl"].asString(); if (slurl.empty()) { - LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); - if(region) - { - LLSLURL region_slurl(region->getName(), chat.mPosAgent); - slurl = region_slurl.getLocationString(); - } + LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); + if (region) + { + S32 x, y, z; + LLSLURL::globalPosToXYZ(LLVector3d(chat.mPosAgent), x, y, z); + slurl = region->getName() + llformat("/%d/%d/%d", x, y, z); + } } url += "&slurl=" + slurl; -- cgit v1.2.3