diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llimview.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 65 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_incoming_call.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_outgoing_call.xml | 14 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 10 |
5 files changed, 73 insertions, 29 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ee785e7ecb..dc32291714 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1124,13 +1124,9 @@ 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); - - // dock the dialog to the sys well, where other sys messages appear - setDockControl(new LLDockControl(LLBottomTray::getInstance()->getSysWell(), - this, getDockTongue(), LLDockControl::TOP, - boost::bind(&LLOutgoingCallDialog::getAllowedRect, this, _1))); } @@ -1155,6 +1151,11 @@ BOOL LLOutgoingCallDialog::postBuild() childSetAction("Cancel", onCancel, this); + // dock the dialog to the sys well, where other sys messages appear + setDockControl(new LLDockControl(LLBottomTray::getInstance()->getSysWell(), + this, getDockTongue(), LLDockControl::TOP, + boost::bind(&LLOutgoingCallDialog::getAllowedRect, this, _1))); + return success; } diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index d93913b944..ae32ec7d11 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -870,29 +870,60 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s void LLVoiceChannelP2P::setState(EState state) { - // HACK: Open/close the call window if needed. + // *HACK: Open/close the call window if needed. toggleCallWindowIfNeeded(state); - // *HACK: open outgoing call floater if needed, might be better done elsewhere. - mCallDialogPayload["session_id"] = mSessionID; - mCallDialogPayload["session_name"] = mSessionName; - mCallDialogPayload["other_user_id"] = mOtherUserID; - if (!mReceivedCall && state == STATE_RINGING) - { - llinfos << "RINGINGGGGGGGG " << mSessionName << llendl; - if (!mSessionName.empty()) + if (mReceivedCall) // incoming call + { + // you only "answer" voice invites in p2p mode + // so provide a special purpose message here + if (mReceivedCall && state == STATE_RINGING) { - LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE); + gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs); + doSetState(state); + return; } } - - // you only "answer" voice invites in p2p mode - // so provide a special purpose message here - if (mReceivedCall && state == STATE_RINGING) + else // outgoing call { - gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs); - doSetState(state); - return; + mCallDialogPayload["session_id"] = mSessionID; + mCallDialogPayload["session_name"] = mSessionName; + mCallDialogPayload["other_user_id"] = mOtherUserID; + 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()) + { + 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_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml index 9c2898945b..526fda90d1 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -12,7 +12,7 @@ width="410"> <floater.string name="localchat"> - Local Voice Chat + Nearby Voice Chat </floater.string> <floater.string name="anonymous"> 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 44956f7e52..82417de8a7 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -12,7 +12,7 @@ width="410"> <floater.string name="localchat"> - Local Voice Chat + Nearby Voice Chat </floater.string> <floater.string name="anonymous"> @@ -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" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ff0cd7ffeb..df263ddf3d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5585,7 +5585,7 @@ We're sorry. This area has reached maximum capacity for voice conversation icon="notifytip.tga" name="VoiceChannelDisconnected" type="notifytip"> -You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to spatial voice chat. +You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to Nearby Voice Chat. <unique> <context key="VOICE_CHANNEL_NAME"/> </unique> @@ -5595,7 +5595,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect icon="notifytip.tga" name="VoiceChannelDisconnectedP2P" type="notifytip"> -[VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to spatial voice chat. +[VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to Nearby Voice Chat. <unique> <context key="VOICE_CHANNEL_NAME"/> </unique> @@ -5605,7 +5605,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect icon="notifytip.tga" name="P2PCallDeclined" type="notifytip"> -[VOICE_CHANNEL_NAME] has declined your call. You will now be reconnected to spatial voice chat. +[VOICE_CHANNEL_NAME] has declined your call. You will now be reconnected to Nearby Voice Chat. <unique> <context key="VOICE_CHANNEL_NAME"/> </unique> @@ -5615,7 +5615,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect icon="notifytip.tga" name="P2PCallNoAnswer" type="notifytip"> -[VOICE_CHANNEL_NAME] is not available to take your call. You will now be reconnected to spatial voice chat. +[VOICE_CHANNEL_NAME] is not available to take your call. You will now be reconnected to Nearby Voice Chat. <unique> <context key="VOICE_CHANNEL_NAME"/> </unique> @@ -5625,7 +5625,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect icon="notifytip.tga" name="VoiceChannelJoinFailed" type="notifytip"> -Failed to connect to [VOICE_CHANNEL_NAME], please try again later. You will now be reconnected to spatial voice chat. +Failed to connect to [VOICE_CHANNEL_NAME], please try again later. You will now be reconnected to Nearby Voice Chat. <unique> <context key="VOICE_CHANNEL_NAME"/> </unique> |