From 1b0b439c23a8f4d27950e0205cd4ba2be6e034a3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 13 Nov 2009 17:53:12 +0000 Subject: make the outgoing call dialog appear and disappear smarter. this is sort of less like the spec but more like... reality... --- indra/newview/llimview.cpp | 1 + indra/newview/llvoicechannel.cpp | 28 +++++++++++++++++++++- .../skins/default/xui/en/floater_outgoing_call.xml | 12 ++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ee785e7ecb..982fa54a93 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1124,6 +1124,7 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) LLSD callee_id = mPayload["other_user_id"]; childSetTextArg("calling", "[CALLEE_NAME]", callee_name); + childSetTextArg("connecting", "[CALLEE_NAME]", callee_name); LLAvatarIconCtrl* icon = getChild("avatar_icon"); icon->setValue(callee_id); 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(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + if (ocd) + { + ocd->getChild("calling")->setVisible(true); + ocd->getChild("leaving")->setVisible(true); + ocd->getChild("connecting")->setVisible(false); + } } } + /*else if (state == STATE_CONNECTED) + { + LLOutgoingCallDialog *ocd = dynamic_cast(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + if (ocd) + { + ocd->getChild("calling")->setVisible(false); + ocd->getChild("leaving")->setVisible(false); + ocd->getChild("connecting")->setVisible(true); + } + }*/ + else if (state == STATE_HUNG_UP || + state == STATE_CONNECTED) + { + LLOutgoingCallDialog *ocd = dynamic_cast(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + if (ocd) + { + ocd->closeFloater(); + } + } } LLVoiceChannel::setState(state); diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index 525cfbab18..82417de8a7 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -35,6 +35,18 @@ left_delta="19" top="35" width="36" /> + +Connecting to [CALLEE_NAME] +