summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-20 19:24:07 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-20 19:24:07 +0200
commitd0c1593d85cd26ad822d31e21df7a1864d66541c (patch)
tree30ceb3cfc19ccb36b7bcc7f0e5a2ad3efdd38747 /indra/newview/llvoicechannel.cpp
parent9d64bf132e27739dedeca17a1d952655c6b52ac3 (diff)
parent0c468557b9e38ec4be201fa991499ed095a4d8c3 (diff)
Merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r--indra/newview/llvoicechannel.cpp31
1 files changed, 25 insertions, 6 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index 21054dacd0..8f63df8c29 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -754,6 +754,8 @@ LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID& session_id, const std::string
void LLVoiceChannelP2P::handleStatusChange(EStatusType type)
{
+ llinfos << "P2P CALL CHANNEL STATUS CHANGE: incoming=" << int(mReceivedCall) << " newstatus=" << LLVoiceClientStatusObserver::status2string(type) << " (mState=" << mState << ")" << llendl;
+
// status updates
switch(type)
{
@@ -880,6 +882,8 @@ void LLVoiceChannelP2P::setState(EState state)
// *HACK: Open/close the call window if needed.
toggleCallWindowIfNeeded(state);
+ llinfos << "P2P CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << llendl;
+
if (mReceivedCall) // incoming call
{
// you only "answer" voice invites in p2p mode
@@ -896,7 +900,8 @@ void LLVoiceChannelP2P::setState(EState state)
mCallDialogPayload["session_id"] = mSessionID;
mCallDialogPayload["session_name"] = mSessionName;
mCallDialogPayload["other_user_id"] = mOtherUserID;
- if (state == STATE_RINGING)
+ if (state == STATE_RINGING ||
+ state == STATE_CALL_STARTED)
{
// *HACK: open outgoing call floater if needed, might be better done elsewhere.
// *TODO: should move this squirrelly ui-fudging crap into LLOutgoingCallDialog itself
@@ -908,6 +913,7 @@ void LLVoiceChannelP2P::setState(EState state)
ocd->getChild<LLTextBox>("calling")->setVisible(true);
ocd->getChild<LLTextBox>("leaving")->setVisible(true);
ocd->getChild<LLTextBox>("connecting")->setVisible(false);
+ ocd->getChild<LLTextBox>("noanswer")->setVisible(false);
}
}
}
@@ -919,16 +925,29 @@ void LLVoiceChannelP2P::setState(EState state)
ocd->getChild<LLTextBox>("calling")->setVisible(false);
ocd->getChild<LLTextBox>("leaving")->setVisible(false);
ocd->getChild<LLTextBox>("connecting")->setVisible(true);
+ ocd->getChild<LLTextBox>("noanswer")->setVisible(false);
}
}*/
+ else if (state == STATE_ERROR)
+ {
+ LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
+ if (ocd)
+ {
+ ocd->getChild<LLTextBox>("calling")->setVisible(false);
+ ocd->getChild<LLTextBox>("leaving")->setVisible(false);
+ ocd->getChild<LLTextBox>("connecting")->setVisible(false);
+ ocd->getChild<LLTextBox>("noanswer")->setVisible(true);
+ }
+ }
else if (state == STATE_HUNG_UP ||
state == STATE_CONNECTED)
{
- LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
- if (ocd)
- {
- ocd->closeFloater();
- }
+ // hide popup
+ LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
+ if (ocd)
+ {
+ ocd->closeFloater();
+ }
}
}