summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychat.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-04 13:50:32 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-04 13:50:32 -0500
commitc9c9943098d35914f7b8591bf66ea1ae3985a94e (patch)
treedaa74a4288a0e5e5c028717e0b925633c11eac5b /indra/newview/llnearbychat.cpp
parent92a1ecd5fdfff2490cb563e83baff88fc6120882 (diff)
parent5b695ac56a7fbbb4d1f63bccb0c147c46e56ebcf (diff)
automated merge viewer2.0->avp
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r--indra/newview/llnearbychat.cpp29
1 files changed, 10 insertions, 19 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index ee3be0a5e3..18e5169930 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -54,10 +54,11 @@
#include "llstylemap.h"
#include "lldraghandle.h"
-#include "lltrans.h"
+
#include "llbottomtray.h"
#include "llnearbychatbar.h"
#include "llfloaterreg.h"
+#include "lltrans.h"
static const S32 RESIZE_BAR_THICKNESS = 3;
@@ -146,6 +147,7 @@ std::string appendTime()
return timeStr;
}
+
void LLNearbyChat::addMessage(const LLChat& chat,bool archive)
{
if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
@@ -167,18 +169,15 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive)
}
}
+ LLChat& tmp_chat = const_cast<LLChat&>(chat);
+
+ if(tmp_chat.mTimeStr.empty())
+ tmp_chat.mTimeStr = appendTime();
+
bool use_plain_text_chat_history = gSavedSettings.getBOOL("PlainTextChatHistory");
if (!chat.mMuted)
{
- std::string message = chat.mText;
-
-
- LLChat& tmp_chat = const_cast<LLChat&>(chat);
-
- if(tmp_chat.mTimeStr.empty())
- tmp_chat.mTimeStr = appendTime();
-
if (chat.mChatStyle == CHAT_STYLE_IRC)
{
LLColor4 txt_color = LLUIColorTable::instance().getColor("White");
@@ -191,17 +190,9 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive)
append_style_params.readonly_color(txt_color);
append_style_params.font.name(font_name);
append_style_params.font.size(font_size);
- if (chat.mFromName.size() > 0)
- {
- append_style_params.font.style = "ITALIC";
- LLChat add_chat=chat;
- add_chat.mText = chat.mFromName + " ";
- mChatHistory->appendMessage(add_chat, use_plain_text_chat_history, append_style_params);
- }
-
- message = message.substr(3);
append_style_params.font.style = "ITALIC";
- mChatHistory->appendText(message, FALSE, append_style_params);
+
+ mChatHistory->appendMessage(chat, use_plain_text_chat_history, append_style_params);
}
else
{