diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-09-21 15:47:08 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-09-21 15:47:08 -0700 |
commit | bd4acad1c1df22f509633f6e504c3b44880673cc (patch) | |
tree | 1959cca80114e8e98ea367ea507e4ec46d7cb684 /indra/newview/llfloaterconversationpreview.cpp | |
parent | 6dd2bf36c52fa00732ed5a3910539f38c91ff173 (diff) | |
parent | 8b63f7f50367f5726d03fb784f5a2f0783470b9c (diff) |
merging in latest changes
Diffstat (limited to 'indra/newview/llfloaterconversationpreview.cpp')
-rw-r--r-- | indra/newview/llfloaterconversationpreview.cpp | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp index 88efc39764..a3825eafc8 100644 --- a/indra/newview/llfloaterconversationpreview.cpp +++ b/indra/newview/llfloaterconversationpreview.cpp @@ -29,6 +29,7 @@ #include "llfloaterconversationpreview.h" #include "llimview.h" #include "lllineeditor.h" +#include "llnearbychat.h" #include "llspinctrl.h" #include "lltrans.h" @@ -43,7 +44,6 @@ LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_i BOOL LLFloaterConversationPreview::postBuild() { mChatHistory = getChild<LLChatHistory>("chat_history"); - getChild<LLUICtrl>("more_history")->setCommitCallback(boost::bind(&LLFloaterConversationPreview::onMoreHistoryBtnClick, this)); const LLConversation* conv = LLConversationLog::instance().getConversation(mSessionID); std::string name; @@ -119,20 +119,39 @@ void LLFloaterConversationPreview::showHistory() { LLSD msg = *iter; + LLUUID from_id = LLUUID::null; std::string time = msg["time"].asString(); - LLUUID from_id = msg["from_id"].asUUID(); std::string from = msg["from"].asString(); std::string message = msg["message"].asString(); - bool is_history = msg["is_history"].asBoolean(); + + if (msg["from_id"].isDefined()) + { + from_id = msg["from_id"].asUUID(); + } + else + { + std::string legacy_name = gCacheName->buildLegacyName(from); + gCacheName->getUUID(legacy_name, from_id); + } LLChat chat; chat.mFromID = from_id; chat.mSessionID = mSessionID; chat.mFromName = from; chat.mTimeStr = time; - chat.mChatStyle = is_history ? CHAT_STYLE_HISTORY : chat.mChatStyle; + chat.mChatStyle = CHAT_STYLE_HISTORY; chat.mText = message; + if (from_id.isNull() && SYSTEM_FROM == from) + { + chat.mSourceType = CHAT_SOURCE_SYSTEM; + + } + else if (from_id.isNull()) + { + chat.mSourceType = LLNearbyChat::isWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT; + } + mChatHistory->appendMessage(chat); } |