From 0ec2bacfac207451386b55006f94e917f1277edc Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 16 Dec 2009 18:14:15 +0200 Subject: Work on EXT-3431 Implement 'mute/unmute everyone else' moderation in the voice control panel -- changed behavior of 'mute/unmute everyone else' action to disable/enable voice chat and allow/disallow selected participant Improvements to have more intellectual processing of several following requests is necessary --HG-- branch : product-engine --- indra/newview/llimview.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1d56fc0cab..ad30b844a9 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2733,6 +2733,11 @@ public: { im_floater->processSessionUpdate(input["body"]["info"]); } + LLIMSpeakerMgr* im_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id); + if (im_mgr) + { + im_mgr->processSessionUpdate(input["body"]["info"]); + } } }; -- cgit v1.2.3 From 05b840d6b7576a30165f26f0b9c4c44136120e2d Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Thu, 17 Dec 2009 13:53:59 +0200 Subject: fixed normal bug (EXT-3435) All voice notifications should look similar and according to the Voice UI Spec - added new voice notification that replaced notification toasts - now LLOutgoingCallDialog manages visibility of its controls on its own --HG-- branch : product-engine --- indra/newview/llimview.cpp | 117 ++++++++++++++++++++++++++++----------------- 1 file changed, 72 insertions(+), 45 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ad30b844a9..28d9f2170d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -93,7 +93,8 @@ const static std::string ADHOC_NAME_SUFFIX(" Conference"); std::string LLCallDialogManager::sPreviousSessionlName = ""; std::string LLCallDialogManager::sCurrentSessionlName = ""; LLIMModel::LLIMSession* LLCallDialogManager::sSession = NULL; - +LLVoiceChannel::EState LLCallDialogManager::sOldState = LLVoiceChannel::STATE_READY; +const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-1417BF03DDB4"); // // Globals // @@ -1280,12 +1281,22 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id) void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) { LLSD mCallDialogPayload; - LLOutgoingCallDialog* ocd; + LLOutgoingCallDialog* ocd = NULL; + + if(sOldState == new_state) + { + return; + } + + sOldState = new_state; mCallDialogPayload["session_id"] = sSession->mSessionID; mCallDialogPayload["session_name"] = sSession->mName; mCallDialogPayload["other_user_id"] = sSession->mOtherParticipantID; mCallDialogPayload["old_channel_name"] = sPreviousSessionlName; + mCallDialogPayload["state"] = new_state; + mCallDialogPayload["disconnected_channel_name"] = sSession->mName; + mCallDialogPayload["session_type"] = sSession->mSessionType; switch(new_state) { @@ -1295,46 +1306,10 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat { return; } - - 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); - ocd->getChild("noanswer")->setVisible(false); - ocd->getChild("Cancel")->setVisible(true); - } - return; - - case LLVoiceChannel::STATE_RINGING : - ocd = dynamic_cast(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); - if (ocd) - { - ocd->getChild("calling")->setVisible(false); - ocd->getChild("leaving")->setVisible(true); - ocd->getChild("connecting")->setVisible(true); - ocd->getChild("noanswer")->setVisible(false); - ocd->getChild("Cancel")->setVisible(true); - } - return; - - case LLVoiceChannel::STATE_ERROR : - mCallDialogPayload["start_timer"] = true; - 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(false); - ocd->getChild("noanswer")->setVisible(true); - ocd->getChild("Cancel")->setVisible(false); - } - return; + break; case LLVoiceChannel::STATE_CONNECTED : - case LLVoiceChannel::STATE_HUNG_UP : - ocd = dynamic_cast(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + ocd = LLFloaterReg::findTypedInstance("outgoing_call", LLOutgoingCallDialog::OCD_KEY); if (ocd) { ocd->closeFloater(); @@ -1345,6 +1320,11 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat break; } + ocd = LLFloaterReg::getTypedInstance("outgoing_call", LLOutgoingCallDialog::OCD_KEY); + if(ocd) + { + ocd->show(mCallDialogPayload); + } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1374,12 +1354,13 @@ void LLCallDialog::onOpen(const LLSD& key) LLOutgoingCallDialog::LLOutgoingCallDialog(const LLSD& payload) : LLCallDialog(payload) { - LLOutgoingCallDialog* instance = LLFloaterReg::findTypedInstance("outgoing_call", payload); + LLOutgoingCallDialog* instance = LLFloaterReg::findTypedInstance("outgoing_call", LLOutgoingCallDialog::OCD_KEY); if(instance && instance->getVisible()) { instance->onCancel(instance); } } + void LLOutgoingCallDialog::draw() { if (lifetimeHasExpired()) @@ -1408,10 +1389,14 @@ void LLOutgoingCallDialog::onLifetimeExpired() closeFloater(); } -void LLOutgoingCallDialog::onOpen(const LLSD& key) +void LLOutgoingCallDialog::show(const LLSD& key) { - LLCallDialog::onOpen(key); + mPayload = key; + + // hide all text at first + hideAllText(); + // customize text strings // tell the user which voice channel they are leaving if (!mPayload["old_channel_name"].asString().empty()) { @@ -1422,6 +1407,12 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) childSetTextArg("leaving", "[CURRENT_CHAT]", getString("localchat")); } + if (!mPayload["disconnected_channel_name"].asString().empty()) + { + childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); + childSetTextArg("nearby_P2P", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); + } + std::string callee_name = mPayload["session_name"].asString(); if (callee_name == "anonymous") { @@ -1438,12 +1429,48 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) // stop timer by default mLifetimeTimer.stop(); - if(mPayload.has("start_timer")) + + // show only necessary strings and controls + switch(mPayload["state"].asInteger()) { - mLifetimeTimer.reset(); + case LLVoiceChannel::STATE_CALL_STARTED : + getChild("calling")->setVisible(true); + getChild("leaving")->setVisible(true); + break; + case LLVoiceChannel::STATE_RINGING : + getChild("leaving")->setVisible(true); + getChild("connecting")->setVisible(true); + break; + case LLVoiceChannel::STATE_ERROR : + getChild("noanswer")->setVisible(true); + getChild("Cancel")->setVisible(false); + mLifetimeTimer.start(); + break; + case LLVoiceChannel::STATE_HUNG_UP : + if (mPayload["session_type"].asInteger() == LLIMModel::LLIMSession::P2P_SESSION) + { + getChild("nearby_P2P")->setVisible(true); + } + else + { + getChild("nearby")->setVisible(true); + } + getChild("Cancel")->setVisible(false); + mLifetimeTimer.start(); } + + openFloater(LLOutgoingCallDialog::OCD_KEY); } +void LLOutgoingCallDialog::hideAllText() +{ + getChild("calling")->setVisible(false); + getChild("leaving")->setVisible(false); + getChild("connecting")->setVisible(false); + getChild("nearby_P2P")->setVisible(false); + getChild("nearby")->setVisible(false); + getChild("noanswer")->setVisible(false); +} //static void LLOutgoingCallDialog::onCancel(void* user_data) -- cgit v1.2.3 From fd83b1fa11f3f84113560ce4ba6f748af64b0361 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Thu, 17 Dec 2009 16:14:49 +0200 Subject: fixed normal bug (EXT-3540) Wrong VOICE CHAT names in the "Calling to ..." and "Connecting to ..." voice notifications --HG-- branch : product-engine --- indra/newview/llimview.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 28d9f2170d..9e878f8c75 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1274,8 +1274,11 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id) } sSession = session; sSession->mVoiceChannel->setStateChangedCallback(LLCallDialogManager::onVoiceChannelStateChanged); - sPreviousSessionlName = sCurrentSessionlName; - sCurrentSessionlName = session->mName; + if(sCurrentSessionlName != session->mName) + { + sPreviousSessionlName = sCurrentSessionlName; + sCurrentSessionlName = session->mName; + } } void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) -- cgit v1.2.3