From 8e52ade6dd3aaeb33b18d8a99a169633f472b973 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 8 Sep 2010 14:26:03 -0700 Subject: Ported use group name in chat feature from Emerald --- linden/indra/newview/app_settings/settings.xml | 11 +++++++++++ linden/indra/newview/llviewermessage.cpp | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 333a780..667f0ad 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -772,6 +772,17 @@ Value 0 + ShowGroupNameInChatIM + + Comment + Show the group name when receiving group IMs + Persist + 1 + Type + Boolean + Value + 1 + ShowMiniMapRadar Comment diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 56aed12..ec6d4d4 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -2313,7 +2313,17 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) position, true); - chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset); + std::string group_name; + if (gAgent.isInGroup(session_id) && gSavedSettings.getBOOL("ShowGroupNameInChatIM")) + { + group_name = std::string((char*)binary_bucket); + chat.mText = std::string("[") + group_name + std::string("] ") + name + + separator_string + saved + message.substr(message_offset); + } + else + { + chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset); + } LLFloaterChat::addChat(chat, TRUE, is_this_agent); } break; -- cgit v1.1