From 4d9762eb846ae1894f0c31eecb6230803018e730 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Tue, 22 Dec 2009 12:26:06 +0200 Subject: work on EXT-3463 - Ambiguity: some system messages are shown as sent from avatar and others are shown as sent from SL --HG-- branch : product-engine --- indra/newview/llimview.cpp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8917cc11e1..a521eb56af 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -243,6 +243,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES std::string joined_call = LLTrans::getString("joined_call"); std::string other_avatar_name = ""; + std::string message; + switch(mSessionType) { case AVALINE_SESSION: @@ -255,10 +257,13 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, started_call); + message = other_avatar_name + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); + break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), joined_call); + message = you + " " + joined_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -268,10 +273,12 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), started_call); + message = you + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, joined_call); + message = other_avatar_name + " " + joined_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -295,10 +302,12 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, started_call); + message = other_avatar_name + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), joined_call); + message = you + " " + joined_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -308,7 +317,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), started_call); + message = you + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; default: break; -- cgit v1.2.3 From d07fd64b6fc3f4c6af648ec43b84cd82c7e62fc6 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 23 Dec 2009 14:40:52 +0200 Subject: finished EXT-1912 Add handling restrictions of PSTN P2P calls in new IM Floaters chiclets for avaline calls are not spawned anymore --HG-- branch : product-engine --- indra/newview/llimview.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d209060b58..3345f7d0bf 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -483,6 +483,17 @@ bool LLIMModel::LLIMSession::isAdHoc() return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID)); } +bool LLIMModel::LLIMSession::isP2P() +{ + return IM_NOTHING_SPECIAL == mType; +} + +bool LLIMModel::LLIMSession::isOtherParticipantAvaline() +{ + return !mOtherParticipantIsAvatar; +} + + void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id) { LLIMSession* session = findIMSession(old_session_id); -- cgit v1.2.3 From 315c6dec0647f6f985d73d2bd28070aa78f3899e Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Wed, 23 Dec 2009 17:25:49 +0200 Subject: fixed normal bug (EXT-2787) Outdated voice chat invitation never hides itself - P2P and AVALINE invitationswill hide now if a call is not valid anymore - GROUP and ADHOC invitations will stay on a screen --HG-- branch : product-engine --- indra/newview/llimview.cpp | 63 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 3345f7d0bf..e2e3524f74 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1511,7 +1511,7 @@ bool LLOutgoingCallDialog::lifetimeHasExpired() if (mLifetimeTimer.getStarted()) { F32 elapsed_time = mLifetimeTimer.getElapsedTimeF32(); - if (elapsed_time > LIFETIME) + if (elapsed_time > mLifetime) { return true; } @@ -1532,6 +1532,13 @@ void LLOutgoingCallDialog::show(const LLSD& key) // hide all text at first hideAllText(); + // init notification's lifetime + std::istringstream ss( getString("lifetime") ); + if (!(ss >> mLifetime)) + { + mLifetime = DEFAULT_LIFETIME; + } + // customize text strings // tell the user which voice channel they are leaving if (!mPayload["old_channel_name"].asString().empty()) @@ -1641,6 +1648,43 @@ LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) : LLCallDialog(payload) { } +void LLIncomingCallDialog::draw() +{ + if (lifetimeHasExpired()) + { + onLifetimeExpired(); + } + LLDockableFloater::draw(); +} + +bool LLIncomingCallDialog::lifetimeHasExpired() +{ + if (mLifetimeTimer.getStarted()) + { + F32 elapsed_time = mLifetimeTimer.getElapsedTimeF32(); + if (elapsed_time > mLifetime) + { + return true; + } + } + return false; +} + +void LLIncomingCallDialog::onLifetimeExpired() +{ + // check whether a call is valid or not + if (LLVoiceClient::getInstance()->findSession(mPayload["caller_id"].asUUID())) + { + // restart notification's timer if call is still valid + mLifetimeTimer.start(); + } + else + { + // close invitation if call is already not valid + mLifetimeTimer.stop(); + closeFloater(); + } +} BOOL LLIncomingCallDialog::postBuild() { @@ -1650,6 +1694,13 @@ BOOL LLIncomingCallDialog::postBuild() LLSD caller_id = mPayload["caller_id"]; std::string caller_name = mPayload["caller_name"].asString(); + // init notification's lifetime + std::istringstream ss( getString("lifetime") ); + if (!(ss >> mLifetime)) + { + mLifetime = DEFAULT_LIFETIME; + } + std::string call_type; if (gAgent.isInGroup(session_id)) { @@ -1687,6 +1738,16 @@ BOOL LLIncomingCallDialog::postBuild() childSetAction("Start IM", onStartIM, this); childSetFocus("Accept"); + if(mPayload["notify_box_type"] != "VoiceInviteGroup" && mPayload["notify_box_type"] != "VoiceInviteAdHoc") + { + // starting notification's timer for P2P and AVALINE invitations + mLifetimeTimer.start(); + } + else + { + mLifetimeTimer.stop(); + } + return TRUE; } -- cgit v1.2.3 From 404f164b5cfb48f3b6974e078d6d0817b7b7ff4d Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Thu, 24 Dec 2009 16:29:38 +0200 Subject: implemented normal task (EXT-2211) Add textual indication (IM messages) about incoming voice calls and reactions on them (All types of IMs) - added textual indications about call starters for Group and AdHoc calls --HG-- branch : product-engine --- indra/newview/llimview.cpp | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e2e3524f74..8c33c94bbe 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -248,7 +248,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(mSessionType) { case AVALINE_SESSION: - // *TODO: test avaline calls (EXT-2211) + // no text notifications + break; case P2P_SESSION: gCacheName->getFullName(mOtherParticipantID, other_avatar_name); @@ -283,28 +284,14 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES break; } } - - // Update speakers list when connected - if (LLVoiceChannel::STATE_CONNECTED == new_state) - { - mSpeakers->update(true); - } - break; case GROUP_SESSION: case ADHOC_SESSION: - // *TODO: determine call starter's name "other_avatar_name" (EXT-2211) - // decide how to show notifications for a group/adhoc chat already opened - // for now there is no notification from voice channel for this case if(direction == LLVoiceChannel::INCOMING_CALL) { switch(new_state) { - case LLVoiceChannel::STATE_CALL_STARTED : - message = other_avatar_name + " " + started_call; - LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); - break; case LLVoiceChannel::STATE_CONNECTED : message = you + " " + joined_call; LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); @@ -324,13 +311,11 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES break; } } - - // Update speakers list when connected - if (LLVoiceChannel::STATE_CONNECTED == new_state) - { - mSpeakers->update(true); - } - break; + } + // Update speakers list when connected + if (LLVoiceChannel::STATE_CONNECTED == new_state) + { + mSpeakers->update(true); } } @@ -1878,6 +1863,14 @@ void LLIncomingCallDialog::processCallResponse(S32 response) new LLViewerChatterBoxInvitationAcceptResponder( session_id, inv_type)); + + // send notification message to the corresponding chat + if (mPayload["notify_box_type"].asString() == "VoiceInviteGroup" || mPayload["notify_box_type"].asString() == "VoiceInviteAdHoc") + { + std::string started_call = LLTrans::getString("started_call"); + std::string message = mPayload["caller_name"].asString() + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(session_id, SYSTEM_FROM, LLUUID::null, message); + } } } if (voice) -- cgit v1.2.3 From 0d0f10441b26206da2941d5e1f58f0e8207fc757 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 25 Dec 2009 13:17:53 +0200 Subject: moved to base class LLCallDialog method draw(); added check to draw LLCallDialog if floater has dock control; --HG-- branch : product-engine --- indra/newview/llimview.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e2e3524f74..f001bbf123 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1497,13 +1497,17 @@ LLCallDialog(payload) } } -void LLOutgoingCallDialog::draw() +void LLCallDialog::draw() { if (lifetimeHasExpired()) { onLifetimeExpired(); } - LLDockableFloater::draw(); + + if (getDockControl() != NULL) + { + LLDockableFloater::draw(); + } } bool LLOutgoingCallDialog::lifetimeHasExpired() @@ -1648,14 +1652,6 @@ LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) : LLCallDialog(payload) { } -void LLIncomingCallDialog::draw() -{ - if (lifetimeHasExpired()) - { - onLifetimeExpired(); - } - LLDockableFloater::draw(); -} bool LLIncomingCallDialog::lifetimeHasExpired() { -- cgit v1.2.3 From 91a84107576d8d527cf152eda32a9b7091e17e01 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 25 Dec 2009 16:31:52 +0200 Subject: Fixed normal bug EXT-3544 (Voice icon doesn't become "muted" in the voice controls panel after muting a resident) --added updating of speakers in speaker manager when LLVoiceClient::participantUpdatedEvent and LLViewerChatterBoxSessionAgentListUpdates::post events come. --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 70f15e0057..388e0c8d8d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2534,6 +2534,11 @@ void LLIMMgr::processAgentListUpdates(const LLUUID& session_id, const LLSD& body if (speaker_mgr) { speaker_mgr->updateSpeakers(body); + + // also the same call is added into LLVoiceClient::participantUpdatedEvent because + // sometimes it is called AFTER LLViewerChatterBoxSessionAgentListUpdates::post() + // when moderation state changed too late. See EXT-3544. + speaker_mgr->update(true); } else { -- cgit v1.2.3 From daed86bbb0fa1ee394a83d597cd5846809d14ba3 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Sat, 26 Dec 2009 16:58:05 +0200 Subject: implemented EXT-3682 Dedicated icon is required for AvaLine callers in the VCP --HG-- branch : product-engine --- indra/newview/llimview.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 388e0c8d8d..37ab144934 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1712,7 +1712,14 @@ BOOL LLIncomingCallDialog::postBuild() LLUICtrl* caller_name_widget = getChild("caller name"); caller_name_widget->setValue(caller_name + " " + call_type); LLAvatarIconCtrl* icon = getChild("avatar_icon"); - icon->setValue(caller_id); + if (is_avatar) + { + icon->setValue(caller_id); + } + else + { + icon->setValue("Avaline_Icon"); + } childSetAction("Accept", onAccept, this); childSetAction("Reject", onReject, this); -- cgit v1.2.3