From b23a5dda5a730b1d0196d171dc5005e03b2328d4 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Wed, 27 Jan 2010 18:19:52 +0200 Subject: Fixed low bug EXT-4647 ("Leaving nearby voice ..." appears when you're not connected to nearby voice channel). - Added flag to check whether to show "Leaving ...". It is false only if voice in parcel is disabled and channel we leave is nearby. --HG-- branch : product-engine --- indra/newview/llimview.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6ac7378c58..c4b1d7a9f4 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -66,6 +66,7 @@ #include "llspeakers.h" //for LLIMSpeakerMgr #include "lltextutil.h" #include "llviewercontrol.h" +#include "llviewerparcelmgr.h" const static std::string IM_TIME("time"); @@ -1601,6 +1602,9 @@ void LLOutgoingCallDialog::show(const LLSD& key) { mPayload = key; + //will be false only if voice in parcel is disabled and channel we leave is nearby(checked further) + bool show_oldchannel = LLViewerParcelMgr::getInstance()->allowAgentVoice(); + // hide all text at first hideAllText(); @@ -1624,10 +1628,11 @@ void LLOutgoingCallDialog::show(const LLSD& key) } childSetTextArg("leaving", "[CURRENT_CHAT]", old_caller_name); + show_oldchannel = true; } else { - childSetTextArg("leaving", "[CURRENT_CHAT]", getString("localchat")); + childSetTextArg("leaving", "[CURRENT_CHAT]", getString("localchat")); } if (!mPayload["disconnected_channel_name"].asString().empty()) @@ -1672,10 +1677,16 @@ void LLOutgoingCallDialog::show(const LLSD& key) { case LLVoiceChannel::STATE_CALL_STARTED : getChild("calling")->setVisible(true); - getChild("leaving")->setVisible(true); + if(show_oldchannel) + { + getChild("leaving")->setVisible(true); + } break; case LLVoiceChannel::STATE_RINGING : - getChild("leaving")->setVisible(true); + if(show_oldchannel) + { + getChild("leaving")->setVisible(true); + } getChild("connecting")->setVisible(true); break; case LLVoiceChannel::STATE_ERROR : -- cgit v1.2.3