summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r--indra/newview/llvoicechannel.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index 3397fc1e48..ae32ec7d11 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -892,11 +892,37 @@ void LLVoiceChannelP2P::setState(EState state)
if (state == STATE_RINGING)
{
// *HACK: open outgoing call floater if needed, might be better done elsewhere.
+ // *TODO: should move this squirrelly ui-fudging crap into LLOutgoingCallDialog itself
if (!mSessionName.empty())
{
- LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE);
+ LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
+ if (ocd)
+ {
+ ocd->getChild<LLTextBox>("calling")->setVisible(true);
+ ocd->getChild<LLTextBox>("leaving")->setVisible(true);
+ ocd->getChild<LLTextBox>("connecting")->setVisible(false);
+ }
}
}
+ /*else if (state == STATE_CONNECTED)
+ {
+ 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(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();
+ }
+ }
}
LLVoiceChannel::setState(state);