diff options
| author | Igor Borovkov <iborovkov@productengine.com> | 2010-02-04 16:46:34 +0200 | 
|---|---|---|
| committer | Igor Borovkov <iborovkov@productengine.com> | 2010-02-04 16:46:34 +0200 | 
| commit | 32aa9d7deee735d86c88f038f8f6fb7199432ff1 (patch) | |
| tree | 37a17a99a5c918654dae596660847fb06ccd1e04 /indra/newview | |
| parent | b1891e2982cc03ccd695eae82989d3e58695616c (diff) | |
fixed shout/whisper representation for EXT-4777 Implement saving and loading chat history for Nearby Chat (both plain text and widgeted chat)
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llchathistory.cpp | 13 | ||||
| -rw-r--r-- | indra/newview/llnearbychat.cpp | 9 | 
2 files changed, 11 insertions, 11 deletions
| diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 1dc0e8c0a7..f046e08827 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -585,9 +585,16 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL  	bool irc_me = prefix == "/me " || prefix == "/me'";  	// Delimiter after a name in header copy/past and in plain text mode -	std::string delimiter = (chat.mChatType != CHAT_TYPE_SHOUT && chat.mChatType != CHAT_TYPE_WHISPER) -		? ": " -		: " "; +	std::string delimiter = ": "; +	std::string shout = LLTrans::getString("shout"); +	std::string whisper = LLTrans::getString("whisper"); +	if (chat.mChatType == CHAT_TYPE_SHOUT ||  +		chat.mChatType == CHAT_TYPE_WHISPER || +		chat.mText.compare(0, shout.length(), shout) == 0 || +		chat.mText.compare(0, whisper.length(), whisper) == 0) +	{ +		delimiter = " "; +	}  	// Don't add any delimiter after name in irc styled messages  	if (irc_me || chat.mChatStyle == CHAT_STYLE_IRC) diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 6de47fccd2..acb28bd46f 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -203,14 +203,7 @@ void	LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args)  		if (gSavedPerAccountSettings.getBOOL("LogChat"))   		{ -			if (chat.mChatType != CHAT_TYPE_WHISPER && chat.mChatType != CHAT_TYPE_SHOUT) -			{ -				LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText); -			} -			else -			{ -				LLLogChat::saveHistory("chat", "", chat.mFromID, chat.mFromName + " " + chat.mText); -			} +			LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText);  		}  	}  } | 
