From 4c5a998f79e835d1f3436a8f8d1cc920d158fcff Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 17 Feb 2010 16:09:50 +0200 Subject: fixed EXT-5456 Messages from objects are shownas messages from Second Life in nearby chat history from the prev session Completed things which were agreed on: - system messages in the log file are prepended with "Second Life:" after the timestamp - object names set which are parsed extended to object names consisting with any number of words Side effect: "Second Life:" is shown as From Name in Nearby Chat when in plain text chat --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 81cc52528c..3fb043c669 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -264,7 +264,7 @@ public: gCacheName->get(mAvatarID, FALSE, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3, _4)); //*TODO overly defensive thing, source type should be maintained out there - if(chat.mFromID.isNull() || chat.mFromName == SYSTEM_FROM) + if((chat.mFromID.isNull() && chat.mFromName.empty()) || chat.mFromName == SYSTEM_FROM) { mSourceType = CHAT_SOURCE_SYSTEM; } -- cgit v1.2.3 From 73d192a4084132636a9a4eab9c44415bb11161dc Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 17 Feb 2010 17:43:13 +0200 Subject: fixed EXT-5367 Emotes '/me says ...' out of context when nearby chat or group chat window expanded. --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 3fb043c669..8625fe5900 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -796,6 +796,12 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL } } + if (irc_me && !use_plain_text_chat_history) + { + message = chat.mFromName + message; + } + + mEditor->appendText(message, FALSE, style_params); } mEditor->blockUndo(); -- cgit v1.2.3 From f52e7036940a015a405ae94aa016612c4160df9e Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 17 Feb 2010 18:42:20 +0200 Subject: completed EXT-5427 Disable appearance of "i" button for SL system messages in IM and other chats --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 8625fe5900..cf5ac6b2e6 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -122,7 +122,7 @@ public: BOOL handleToolTip(S32 x, S32 y, MASK mask) { LLTextBase* name = getChild("user_name"); - if (name && name->parentPointInView(x, y) && mAvatarID.notNull() && SYSTEM_FROM != mFrom) + if (name && name->parentPointInView(x, y) && mAvatarID.notNull() && mFrom.size() && SYSTEM_FROM != mFrom) { // Spawn at right side of the name textbox. @@ -179,12 +179,7 @@ public: } else if (level == "add") { - std::string name; - name.assign(getFirstName()); - name.append(" "); - name.append(getLastName()); - - LLAvatarActions::requestFriendshipDialog(getAvatarId(), name); + LLAvatarActions::requestFriendshipDialog(getAvatarId(), mFrom); } else if (level == "remove") { @@ -253,8 +248,6 @@ public: } const LLUUID& getAvatarId () const { return mAvatarID;} - const std::string& getFirstName() const { return mFirstName; } - const std::string& getLastName () const { return mLastName; } void setup(const LLChat& chat,const LLStyle::Params& style_params) { @@ -275,9 +268,11 @@ public: userName->setColor(style_params.color()); userName->setValue(chat.mFromName); + mFrom = chat.mFromName; if (chat.mFromName.empty() || CHAT_SOURCE_SYSTEM == mSourceType) { - userName->setValue(LLTrans::getString("SECOND_LIFE")); + mFrom = LLTrans::getString("SECOND_LIFE"); + userName->setValue(mFrom); } @@ -337,8 +332,7 @@ public: { if (id != mAvatarID) return; - mFirstName = first; - mLastName = last; + mFrom = first + " " + last; } protected: static const S32 PADDING = 20; @@ -423,8 +417,6 @@ protected: LLUUID mAvatarID; EChatSourceType mSourceType; - std::string mFirstName; - std::string mLastName; std::string mFrom; LLUUID mSessionID; -- cgit v1.2.3