summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp33
1 files changed, 26 insertions, 7 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index f90a51c3f3..1254664330 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");
@@ -1497,9 +1498,11 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLCallDialog
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-LLCallDialog::LLCallDialog(const LLSD& payload) :
-LLDockableFloater(NULL, false, payload),
-mPayload(payload)
+LLCallDialog::LLCallDialog(const LLSD& payload)
+ : LLDockableFloater(NULL, false, payload),
+
+ mPayload(payload),
+ mLifetime(DEFAULT_LIFETIME)
{
}
@@ -1601,6 +1604,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 +1630,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 +1679,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 +3252,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>