From 0d01300762a8413c3b137e433ee4c02070798792 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 11 Nov 2009 16:59:49 +0000 Subject: sketch-out the outgoing call dialog code. WIP. --- indra/newview/llvoicechannel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 89649407ff..04ae44e08d 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -378,9 +378,15 @@ void LLVoiceChannel::setURI(std::string uri) void LLVoiceChannel::setState(EState state) { + LLSD payload; + payload["session_id"] = mSessionID; + payload["session_name"] = mSessionName; + switch(state) { case STATE_RINGING: + LLFloaterReg::showInstance("outgoing_call", payload, TRUE); + llinfos << "RINGINGGGGGGGG " << mSessionName << llendl; gIMMgr->addSystemMessage(mSessionID, "ringing", mNotifyArgs); break; case STATE_CONNECTED: -- cgit v1.2.3 From cc864d86ce91cd26edc3796acbd9580de4fafbc8 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 11 Nov 2009 18:06:44 +0000 Subject: outgoing call dialog. doesn't do anything and is ugly/wrong, but it exists. WIP. --- indra/newview/llvoicechannel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 04ae44e08d..b0ea07946c 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -385,8 +385,11 @@ void LLVoiceChannel::setState(EState state) switch(state) { case STATE_RINGING: - LLFloaterReg::showInstance("outgoing_call", payload, TRUE); llinfos << "RINGINGGGGGGGG " << mSessionName << llendl; + if (!mSessionName.empty()) + { + LLFloaterReg::showInstance("outgoing_call", payload, TRUE); + } gIMMgr->addSystemMessage(mSessionID, "ringing", mNotifyArgs); break; case STATE_CONNECTED: -- cgit v1.2.3 From 7cf3008da7c44c592af14de7498cf4270afcec31 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 12 Nov 2009 14:15:19 +0000 Subject: more work on the outgoing call popup... --- indra/newview/llvoicechannel.cpp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index b0ea07946c..164cb1a51a 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -378,18 +378,9 @@ void LLVoiceChannel::setURI(std::string uri) void LLVoiceChannel::setState(EState state) { - LLSD payload; - payload["session_id"] = mSessionID; - payload["session_name"] = mSessionName; - switch(state) { case STATE_RINGING: - llinfos << "RINGINGGGGGGGG " << mSessionName << llendl; - if (!mSessionName.empty()) - { - LLFloaterReg::showInstance("outgoing_call", payload, TRUE); - } gIMMgr->addSystemMessage(mSessionID, "ringing", mNotifyArgs); break; case STATE_CONNECTED: @@ -879,6 +870,20 @@ void LLVoiceChannelP2P::setState(EState state) { // HACK: Open/close the call window if needed. toggleCallWindowIfNeeded(state); + + // *HACK: open outgoing call floater if needed, might be better done elsewhere. + LLSD payload; + payload["session_id"] = mSessionID; + payload["session_name"] = mSessionName; + payload["other_user_id"] = mOtherUserID; + if (!mReceivedCall && state == STATE_RINGING) + { + llinfos << "RINGINGGGGGGGG " << mSessionName << llendl; + if (!mSessionName.empty()) + { + LLFloaterReg::showInstance("outgoing_call", payload, TRUE); + } + } // you only "answer" voice invites in p2p mode // so provide a special purpose message here -- cgit v1.2.3 From 64c1146213a1f1313bd061229a962e4d827cb16d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 12 Nov 2009 15:35:08 +0000 Subject: add Cancel button to outgoing call dialog, make it work (perhaps), make the name of the departing voice session more accurate (perhaps). WIP. --- indra/newview/llvoicechannel.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 164cb1a51a..b03e6c2426 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -306,8 +306,10 @@ void LLVoiceChannel::activate() // activating the proximal channel between IM calls LLVoiceChannel* old_channel = sCurrentVoiceChannel; sCurrentVoiceChannel = this; + mCallDialogPayload["old_channel_name"] = ""; if (old_channel) { + mCallDialogPayload["old_channel_name"] = old_channel->getSessionName(); old_channel->deactivate(); } } @@ -790,6 +792,9 @@ void LLVoiceChannelP2P::activate() { if (callStarted()) return; + LLVoiceChannel *voice = LLVoiceChannel::getCurrentVoiceChannel(); + if (voice && !voice->getSessionName().empty()) + LLVoiceChannel::activate(); if (callStarted()) @@ -872,16 +877,15 @@ void LLVoiceChannelP2P::setState(EState state) toggleCallWindowIfNeeded(state); // *HACK: open outgoing call floater if needed, might be better done elsewhere. - LLSD payload; - payload["session_id"] = mSessionID; - payload["session_name"] = mSessionName; - payload["other_user_id"] = mOtherUserID; + 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()) { - LLFloaterReg::showInstance("outgoing_call", payload, TRUE); + LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE); } } -- cgit v1.2.3 From 74cb5c82a4e5eeb1ef722f73c96f64c4750db2be Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 12 Nov 2009 16:01:29 +0000 Subject: fix silly error that was nerfing the outgoing call dialog. more work towards a decent DEV-42312 and DEV-42313 --- indra/newview/llvoicechannel.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llvoicechannel.cpp') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index b03e6c2426..d93913b944 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -792,9 +792,6 @@ void LLVoiceChannelP2P::activate() { if (callStarted()) return; - LLVoiceChannel *voice = LLVoiceChannel::getCurrentVoiceChannel(); - if (voice && !voice->getSessionName().empty()) - LLVoiceChannel::activate(); if (callStarted()) -- cgit v1.2.3