From 4fc7b91a795fb4ad0eaf3b6c7a1779679889fcbf Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 11 Dec 2009 14:26:27 +0200 Subject: =?UTF-8?q?implemented=20EXT-2323=20=E2=80=9CGet=20rid=20from=20ob?= =?UTF-8?q?solete=20notification=20widgets=E2=80=9D;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimview.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index fd1fb38914..95b4196f5f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -72,7 +72,6 @@ #include "llviewerwindow.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llnearbychat.h" #include "llviewerregion.h" #include "llvoicechannel.h" -- cgit v1.2.3 From 12fb5d3a2de9fe49c75b302353f09fc724245a1b Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 11 Dec 2009 14:54:48 +0200 Subject: fixed EXT-3152 (Group Voice chat Notification and Invitation should include group's name) and corrected titles of Voice Control Panel --HG-- branch : product-engine --- indra/newview/llimview.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index fd1fb38914..65874f87e8 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1484,26 +1484,34 @@ BOOL LLIncomingCallDialog::postBuild() { LLDockableFloater::postBuild(); + LLUUID session_id = mPayload["session_id"].asUUID(); LLSD caller_id = mPayload["caller_id"]; - EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger(); - - std::string call_type = getString("VoiceInviteP2P"); std::string caller_name = mPayload["caller_name"].asString(); + + std::string call_type; + if (gAgent.isInGroup(session_id)) + { + LLStringUtil::format_map_t args; + LLGroupData data; + if (gAgent.getGroupData(session_id, data)) + { + args["[GROUP]"] = data.mName; + call_type = getString(mPayload["notify_box_type"], args); + } + } + else + { + call_type = getString(mPayload["notify_box_type"]); + } + if (caller_name == "anonymous") { caller_name = getString("anonymous"); } setTitle(caller_name + " " + call_type); - - // If it is not a P2P invite, then it's an AdHoc invite - if ( type != IM_SESSION_P2P_INVITE ) - { - call_type = getString("VoiceInviteAdHoc"); - } // check to see if this is an Avaline call - LLUUID session_id = mPayload["session_id"].asUUID(); bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id); childSetVisible("Start IM", is_avatar); // no IM for avaline -- cgit v1.2.3 From ee7683f6311c95c8ae57ad0dd49121437de28908 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Fri, 11 Dec 2009 19:53:19 +0200 Subject: fixed normal bug (EXT-3246) Do not show "Calling to..." notification dialog for incoming group and ad-hoc calls now is is able to get a direction of calls through the voice channel's signal for its state changing also choosing of type of IMSession was fixed and was moved from a separate function to the constructor --HG-- branch : product-engine --- indra/newview/llimview.cpp | 71 ++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 41 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index fbed1494ff..bc35260983 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -169,22 +169,39 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mOtherParticipantIsAvatar(true), mStartCallOnInitialize(false) { + // set P2P type by default + mSessionType = P2P_SESSION; + if (IM_NOTHING_SPECIAL == type || IM_SESSION_P2P_INVITE == type) { mVoiceChannel = new LLVoiceChannelP2P(session_id, name, other_participant_id); + + // check if it was AVALINE call + if (!mOtherParticipantIsAvatar) + { + mSessionType = AVALINE_SESSION; + } } else { mVoiceChannel = new LLVoiceChannelGroup(session_id, name); + + // determine whether it is group or conference session + if (gAgent.isInGroup(mSessionID)) + { + mSessionType = GROUP_SESSION; + } + else + { + mSessionType = ADHOC_SESSION; + } } if(mVoiceChannel) { - mVoiceChannelStateChangeConnection = mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2)); + mVoiceChannelStateChangeConnection = mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2, _3)); } - // define what type of session was opened - setSessionType(); - + mSpeakers = new LLIMSpeakerMgr(mVoiceChannel); // All participants will be added to the list of people we've recently interacted with. @@ -217,45 +234,18 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& } } -void LLIMModel::LLIMSession::setSessionType() -{ - // set P2P type by default - mSessionType = P2P_SESSION; - - if (dynamic_cast(mVoiceChannel) && !mOtherParticipantIsAvatar) // P2P AVALINE channel was opened - { - mSessionType = AVALINE_SESSION; - return; - } - else if(dynamic_cast(mVoiceChannel)) // GROUP channel was opened - { - if (mType == IM_SESSION_CONFERENCE_START) - { - mSessionType = ADHOC_SESSION; - return; - } - else if(mType == IM_SESSION_GROUP_START) - { - mSessionType = GROUP_SESSION; - return; - } - } -} - -void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) +void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) { // *TODO: remove hardcoded string!!!!!!!!!!! bool is_p2p_session = dynamic_cast(mVoiceChannel); - bool is_incoming_call = false; std::string other_avatar_name; if(is_p2p_session) { - is_incoming_call = static_cast(mVoiceChannel)->isIncomingCall(); gCacheName->getFullName(mOtherParticipantID, other_avatar_name); - if(is_incoming_call) + if(direction == LLVoiceChannel::INCOMING_CALL) { switch(new_state) { @@ -1059,7 +1049,7 @@ public: if (LLIMMgr::INVITATION_TYPE_VOICE == mInvitiationType) { - gIMMgr->startCall(mSessionID); + gIMMgr->startCall(mSessionID, LLVoiceChannel::INCOMING_CALL); } if ((mInvitiationType == LLIMMgr::INVITATION_TYPE_VOICE @@ -1270,11 +1260,10 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id) sCurrentSessionlName = session->mName; } -void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) +void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) { LLSD mCallDialogPayload; LLOutgoingCallDialog* ocd; - bool is_incoming; mCallDialogPayload["session_id"] = sSession->mSessionID; mCallDialogPayload["session_name"] = sSession->mName; @@ -1285,9 +1274,7 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat { case LLVoiceChannel::STATE_CALL_STARTED : // do not show "Calling to..." if it is incoming call - is_incoming = LLVoiceClient::getInstance()->isSessionIncoming(sSession->mSessionID); - // *TODO: implement for AdHoc and Group voice chats - if(is_incoming) + if(direction == LLVoiceChannel::INCOMING_CALL) { return; } @@ -1469,6 +1456,7 @@ BOOL LLOutgoingCallDialog::postBuild() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLIncomingCallDialog //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) : LLCallDialog(payload) { @@ -1594,7 +1582,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response) if (voice) { - if (gIMMgr->startCall(session_id)) + if (gIMMgr->startCall(session_id, LLVoiceChannel::INCOMING_CALL)) { // always open IM window when connecting to voice LLIMFloater::show(session_id); @@ -2445,11 +2433,12 @@ void LLIMMgr::removeSessionObserver(LLIMSessionObserver *observer) mSessionObservers.remove(observer); } -bool LLIMMgr::startCall(const LLUUID& session_id) +bool LLIMMgr::startCall(const LLUUID& session_id, LLVoiceChannel::EDirection direction) { LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(session_id); if (!voice_channel) return false; + voice_channel->setCallDirection(direction); voice_channel->activate(); return true; } -- cgit v1.2.3 From 222dfaef0aa16ced2fd6285763467e5bfa8ed574 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 14 Dec 2009 16:43:34 +0200 Subject: fixed EXT-3372 [BSI] Typing notification in IM displayed although Resident isn't typing Added explicit resetting of IM floater's title as it was done in 1.23 --HG-- branch : product-engine --- indra/newview/llimview.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index bc35260983..b50d4674f7 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1793,6 +1793,8 @@ LLIMMgr::LLIMMgr() : { mPendingInvitations = LLSD::emptyMap(); mPendingAgentListUpdates = LLSD::emptyMap(); + + LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&LLIMFloater::sRemoveTypingIndicator, _1)); } // Add a message to a session. -- cgit v1.2.3 From a137125afdfcf729b626a92d876a4c652c97c50c Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 14 Dec 2009 18:03:41 +0200 Subject: fixed build --HG-- branch : product-engine --- indra/newview/llimview.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b31c484529..b50d4674f7 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2043,12 +2043,11 @@ LLUUID LLIMMgr::addP2PSession(const std::string& name, LLUUID LLIMMgr::addSession( const std::string& name, EInstantMessage dialog, - const LLUUID& other_participant_id, - bool voice = false) + const LLUUID& other_participant_id) { LLDynamicArray ids; ids.put(other_participant_id); - return addSession(name, dialog, other_participant_id, ids, voice = false); + return addSession(name, dialog, other_participant_id, ids); } // Adds a session using the given session_id. If the session already exists @@ -2057,8 +2056,7 @@ LLUUID LLIMMgr::addSession( const std::string& name, EInstantMessage dialog, const LLUUID& other_participant_id, - const LLDynamicArray& ids, - bool voice = false) + const LLDynamicArray& ids) { if (0 == ids.getLength()) { -- cgit v1.2.3