From a1b973fc2a5d28e64dcf010e3652beda78745d35 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 28 May 2010 00:03:08 +0300 Subject: EXT-7118 FIXED Changed text in group call invite. - Changed group invite string from "has joined a Voice Chat call with the group [GROUP]" to "just joined '[GROUP]' voice channel." - Added special string for group invite question saying "Would you like to leave [CURRENT_CHAT] and join the call with '[GROUP]'"? - Hooked up this string in code. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/458/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 039df69454..2c1983b6d2 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1941,15 +1941,24 @@ void LLIncomingCallDialog::onOpen(const LLSD& key) { LLCallDialog::onOpen(key); + LLStringUtil::format_map_t args; + LLGroupData data; + // if it's a group call, retrieve group name to use it in question + if (gAgent.getGroupData(key["session_id"].asUUID(), data)) + { + args["[GROUP]"] = data.mName; + } // tell the user which voice channel they would be leaving LLVoiceChannel *voice = LLVoiceChannel::getCurrentVoiceChannel(); if (voice && !voice->getSessionName().empty()) { - childSetTextArg("question", "[CURRENT_CHAT]", voice->getSessionName()); + args["[CURRENT_CHAT]"] = voice->getSessionName(); + childSetText("question", getString(key["question_type"].asString(), args)); } else { - childSetTextArg("question", "[CURRENT_CHAT]", getString("localchat")); + args["[CURRENT_CHAT]"] = getString("localchat"); + childSetText("question", getString(key["question_type"].asString(), args)); } } @@ -2480,6 +2489,8 @@ void LLIMMgr::inviteToSession( } std::string notify_box_type; + // voice invite question is different from default only for group call (EXT-7118) + std::string question_type = "VoiceInviteQuestionDefault"; BOOL ad_hoc_invite = FALSE; if(type == IM_SESSION_P2P_INVITE) @@ -2491,6 +2502,7 @@ void LLIMMgr::inviteToSession( { //only really old school groups have voice invitations notify_box_type = "VoiceInviteGroup"; + question_type = "VoiceInviteQuestionGroup"; } else if ( inv_type == INVITATION_TYPE_VOICE ) { @@ -2515,6 +2527,7 @@ void LLIMMgr::inviteToSession( payload["session_handle"] = session_handle; payload["session_uri"] = session_uri; payload["notify_box_type"] = notify_box_type; + payload["question_type"] = question_type; LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(session_id); if (channelp && channelp->callStarted()) -- cgit v1.2.3