summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2009-11-13 17:53:12 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2009-11-13 17:53:12 +0000
commit1b0b439c23a8f4d27950e0205cd4ba2be6e034a3 (patch)
tree0bc70667dbfa05201efbf6ee11007a5a95df66a3 /indra
parent7e59bf358d177789de6f4d5aecc3beb319714cd9 (diff)
make the outgoing call dialog appear and disappear smarter.
this is sort of less like the spec but more like... reality...
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimview.cpp1
-rw-r--r--indra/newview/llvoicechannel.cpp28
-rw-r--r--indra/newview/skins/default/xui/en/floater_outgoing_call.xml12
3 files changed, 40 insertions, 1 deletions
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<LLAvatarIconCtrl>("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<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);
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
@@ -40,6 +40,18 @@
height="20"
layout="topleft"
left="77"
+ name="connecting"
+ top="27"
+ visible="false"
+ width="315"
+ word_wrap="true">
+Connecting to [CALLEE_NAME]
+ </text>
+ <text
+ font="SansSerifLarge"
+ height="20"
+ layout="topleft"
+ left="77"
name="calling"
top="27"
width="315"