diff options
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index f90a51c3f3..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 : @@ -3239,7 +3250,13 @@ void LLCallInfoDialog::show(const std::string& status_name, const LLSD& args) LLSD payload; payload["msg"] = message; - LLFloaterReg::showInstance("call_info", payload); + LLFloater* inst = LLFloaterReg::findInstance("call_info"); + + // avoid recreate instance with the same message + if (inst == NULL || message.getString() != inst->getChild<LLTextBox>("msg")->getValue()) + { + LLFloaterReg::showInstance("call_info", payload); + } } LLHTTPRegistration<LLViewerChatterBoxSessionStartReply> |