summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterchat.cpp
diff options
context:
space:
mode:
authorSergey Borushevsky <sborushevsky@productengine.com>2009-10-29 20:26:56 +0200
committerSergey Borushevsky <sborushevsky@productengine.com>2009-10-29 20:26:56 +0200
commite724fa0ab4c4675b94546f67bd4323704201f4a6 (patch)
tree5fcca2da8a7494c147b94221e845c73176715359 /indra/newview/llfloaterchat.cpp
parent7d64c6a226046d962bf5cd2b1e53df6fe33a730d (diff)
Implemented major task EXT-1487 (Reimplement chat history persistence using LLSD serialization).
Moved loading of IM history from LLIMFloater and LLFloaterIMPanel to LLModel::LLIMSession. Implemented disabling of saving logs if it's disabled in Preferences. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llfloaterchat.cpp')
-rw-r--r--indra/newview/llfloaterchat.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 86abebe7ce..ed14079ae9 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -182,13 +182,7 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4&
void log_chat_text(const LLChat& chat)
{
- std::string histstr;
- if (gSavedPerAccountSettings.getBOOL("LogTimestamp"))
- histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + chat.mText;
- else
- histstr = chat.mText;
-
- LLLogChat::saveHistory(std::string("chat"),histstr);
+ LLLogChat::saveHistory(std::string("chat"), chat.mFromName, chat.mFromID, chat.mText);
}
// static
void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
@@ -476,7 +470,7 @@ void LLFloaterChat::loadHistory()
}
//static
-void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , std::string line, void* userdata)
+void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , const LLSD& line, void* userdata)
{
switch (type)
{
@@ -485,9 +479,10 @@ void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , std::string l
// *TODO: nice message from XML file here
break;
case LLLogChat::LOG_LINE:
+ case LLLogChat::LOG_LLSD:
{
LLChat chat;
- chat.mText = line;
+ chat.mText = line["message"].asString();
get_text_color(chat);
addChatHistory(chat, FALSE);
}