diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2010-01-27 18:19:52 +0200 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2010-01-27 18:19:52 +0200 |
commit | b23a5dda5a730b1d0196d171dc5005e03b2328d4 (patch) | |
tree | 584b24de87d7566f8b8383ffbba0dfa250e609af /indra/newview/llimview.cpp | |
parent | 4b9abb162cd7b4cfca3c98a0611cb2272d336476 (diff) |
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
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
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<LLTextBox>("calling")->setVisible(true); - getChild<LLTextBox>("leaving")->setVisible(true); + if(show_oldchannel) + { + getChild<LLTextBox>("leaving")->setVisible(true); + } break; case LLVoiceChannel::STATE_RINGING : - getChild<LLTextBox>("leaving")->setVisible(true); + if(show_oldchannel) + { + getChild<LLTextBox>("leaving")->setVisible(true); + } getChild<LLTextBox>("connecting")->setVisible(true); break; case LLVoiceChannel::STATE_ERROR : |