diff options
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r-- | indra/newview/llchathistory.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index c552e95cde..31feabe722 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; @@ -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) { @@ -733,8 +740,8 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL LLNotificationPtr notification = LLNotificationsUtil::find(chat.mNotifId); if (notification != NULL) { - LLToastNotifyPanel* notify_box = new LLToastNotifyPanel( - notification); + LLIMToastNotifyPanel* notify_box = new LLIMToastNotifyPanel( + notification, chat.mSessionID); //we can't set follows in xml since it broke toasts behavior notify_box->setFollowsLeft(); notify_box->setFollowsRight(); @@ -742,7 +749,9 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL ctrl_list_t ctrls = notify_box->getControlPanel()->getCtrlList(); S32 offset = 0; - for (ctrl_list_t::iterator it = ctrls.begin(); it != ctrls.end(); it++) + // Children were added by addChild() which uses push_front to insert them into list, + // so to get buttons in correct order reverse iterator is used (EXT-5906) + for (ctrl_list_t::reverse_iterator it = ctrls.rbegin(); it != ctrls.rend(); it++) { LLButton * button = dynamic_cast<LLButton*> (*it); if (button != NULL) @@ -757,7 +766,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL button->getRect().mBottom)); button->setAutoResize(true); button->autoResize(); - offset += 2 * HPAD + button->getRect().getWidth(); + offset += HPAD + button->getRect().getWidth(); button->setFollowsNone(); } } @@ -816,7 +825,6 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL message = chat.mFromName + message; } - mEditor->appendText(message, FALSE, style_params); } mEditor->blockUndo(); |