summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloater.cpp
diff options
context:
space:
mode:
authorSergey Borushevsky <sborushevsky@productengine.com>2009-10-29 20:29:55 +0200
committerSergey Borushevsky <sborushevsky@productengine.com>2009-10-29 20:29:55 +0200
commit15687e2acd07ed3c0a56a61af982595b99dc064f (patch)
tree2e66793429eb7cc465ae2af88cabe391f2443042 /indra/newview/llimfloater.cpp
parent7d8c41b15076666f47470b28b1e7e7b63c064415 (diff)
parente724fa0ab4c4675b94546f67bd4323704201f4a6 (diff)
Automated merge with https://hg.aws.productengine.com/secondlife/viewer-2-0/
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r--indra/newview/llimfloater.cpp50
1 files changed, 2 insertions, 48 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index b86795f696..f3fec70ac9 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -235,11 +235,6 @@ BOOL LLIMFloater::postBuild()
setTitle(LLIMModel::instance().getName(mSessionID));
setDocked(true);
-
- if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") )
- {
- LLLogChat::loadHistory(getTitle(), &chatFromLogFile, (void *)this);
- }
mTypingStart = LLTrans::getString("IM_typing_start_string");
@@ -453,9 +448,6 @@ void LLIMFloater::updateMessages()
{
std::list<LLSD> messages;
LLIMModel::instance().getMessages(mSessionID, messages, mLastMessageIndex+1);
- std::string agent_name;
-
- gCacheName->getFullName(gAgentID, agent_name);
if (messages.size())
{
@@ -464,20 +456,17 @@ void LLIMFloater::updateMessages()
std::ostringstream message;
std::list<LLSD>::const_reverse_iterator iter = messages.rbegin();
std::list<LLSD>::const_reverse_iterator iter_end = messages.rend();
- for (; iter != iter_end; ++iter)
+ for (; iter != iter_end; ++iter)
{
LLSD msg = *iter;
- std::string from = msg["from"].asString();
std::string time = msg["time"].asString();
LLUUID from_id = msg["from_id"].asUUID();
+ std::string from = from_id != gAgentID ? msg["from"].asString() : LLTrans::getString("You");
std::string message = msg["message"].asString();
LLStyle::Params style_params;
style_params.color(chat_color);
- if (from == agent_name)
- from = LLTrans::getString("You");
-
LLChat chat(message);
chat.mFromID = from_id;
chat.mFromName = from;
@@ -657,38 +646,3 @@ void LLIMFloater::removeTypingIndicator(const LLIMInfo* im_info)
}
}
-void LLIMFloater::chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata)
-{
- if (!userdata) return;
-
- LLIMFloater* self = (LLIMFloater*) userdata;
- std::string message = line;
- S32 im_log_option = gSavedPerAccountSettings.getS32("IMLogOptions");
- switch (type)
- {
- case LLLogChat::LOG_EMPTY:
- // add warning log enabled message
- if (im_log_option!=LOG_CHAT)
- {
- message = LLTrans::getString("IM_logging_string");
- }
- break;
- case LLLogChat::LOG_END:
- // add log end message
- if (im_log_option!=LOG_CHAT)
- {
- message = LLTrans::getString("IM_logging_string");
- }
- break;
- case LLLogChat::LOG_LINE:
- // just add normal lines from file
- break;
- default:
- // nothing
- break;
- }
-
- self->mChatHistory->appendText(message, true, LLStyle::Params().color(LLUIColorTable::instance().getColor("ChatHistoryTextColor")));
- self->mChatHistory->blockUndo();
-}
-