diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llcallfloater.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 28 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_incoming_call.xml | 4 |
3 files changed, 34 insertions, 11 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index d9fc4d54ab..4ab5ea1812 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -35,6 +35,7 @@ #include "llcallfloater.h" +#include "llagent.h" #include "llagentdata.h" // for gAgentID #include "llavatarlist.h" #include "llbottomtray.h" @@ -165,9 +166,19 @@ void LLCallFloater::updateSession() mVoiceType = VC_PEER_TO_PEER; break; case IM_SESSION_CONFERENCE_START: - mVoiceType = VC_AD_HOC_CHAT; + case IM_SESSION_GROUP_START: + case IM_SESSION_INVITE: + if (gAgent.isInGroup(session_id)) + { + mVoiceType = VC_GROUP_CHAT; + } + else + { + mVoiceType = VC_AD_HOC_CHAT; + } break; default: + llwarning("Failed to determine voice call IM type", 0); mVoiceType = VC_GROUP_CHAT; break; } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index fd1fb38914..65874f87e8 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1484,26 +1484,34 @@ BOOL LLIncomingCallDialog::postBuild() { LLDockableFloater::postBuild(); + LLUUID session_id = mPayload["session_id"].asUUID(); LLSD caller_id = mPayload["caller_id"]; - EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger(); - - std::string call_type = getString("VoiceInviteP2P"); std::string caller_name = mPayload["caller_name"].asString(); + + std::string call_type; + if (gAgent.isInGroup(session_id)) + { + LLStringUtil::format_map_t args; + LLGroupData data; + if (gAgent.getGroupData(session_id, data)) + { + args["[GROUP]"] = data.mName; + call_type = getString(mPayload["notify_box_type"], args); + } + } + else + { + call_type = getString(mPayload["notify_box_type"]); + } + if (caller_name == "anonymous") { caller_name = getString("anonymous"); } setTitle(caller_name + " " + call_type); - - // If it is not a P2P invite, then it's an AdHoc invite - if ( type != IM_SESSION_P2P_INVITE ) - { - call_type = getString("VoiceInviteAdHoc"); - } // check to see if this is an Avaline call - LLUUID session_id = mPayload["session_id"].asUUID(); bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id); childSetVisible("Start IM", is_avatar); // no IM for avaline diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml index acd59b6f09..81c54ae55e 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -26,6 +26,10 @@ name="VoiceInviteAdHoc"> has joined a Voice Chat call with a conference chat. </floater.string> + <floater.string + name="VoiceInviteGroup"> + has joined a Voice Chat call with the group [GROUP]. + </floater.string> <avatar_icon enabled="false" follows="left|top" |