From 862681b53a61783d292782c2415e8c5caddde136 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 10 Dec 2009 20:07:16 +0200 Subject: Fixed normal bug EXT-3095 (Mute sign is shown in Voice control panel for speaking avatar (refer to screenshot)) --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 895b4ed80e..d9fc4d54ab 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -263,13 +263,18 @@ void LLCallFloater::updateTitle() void LLCallFloater::initAgentData() { - childSetValue("user_icon", gAgentID); + LLPanel* my_panel = getChild ("my_panel"); - std::string name; - gCacheName->getFullName(gAgentID, name); - childSetValue("user_text", name); + if ( my_panel ) + { + my_panel->childSetValue("user_icon", gAgentID); + + std::string name; + gCacheName->getFullName(gAgentID, name); + my_panel->childSetValue("user_text", name); - LLOutputMonitorCtrl* speaking_indicator = getChild("speaking_indicator"); - speaking_indicator->setSpeakerId(gAgentID); + LLOutputMonitorCtrl* speaking_indicator = my_panel->getChild("speaking_indicator"); + speaking_indicator->setSpeakerId(gAgentID); + } } //EOF -- 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/llcallfloater.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index d9fc4d54ab..4ab5ea1812 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -35,6 +35,7 @@ #include "llcallfloater.h" +#include "llagent.h" #include "llagentdata.h" // for gAgentID #include "llavatarlist.h" #include "llbottomtray.h" @@ -165,9 +166,19 @@ void LLCallFloater::updateSession() mVoiceType = VC_PEER_TO_PEER; break; case IM_SESSION_CONFERENCE_START: - mVoiceType = VC_AD_HOC_CHAT; + case IM_SESSION_GROUP_START: + case IM_SESSION_INVITE: + if (gAgent.isInGroup(session_id)) + { + mVoiceType = VC_GROUP_CHAT; + } + else + { + mVoiceType = VC_AD_HOC_CHAT; + } break; default: + llwarning("Failed to determine voice call IM type", 0); mVoiceType = VC_GROUP_CHAT; break; } -- cgit v1.2.3 From eca66a2aa6b507bad1e168bcfafb18e4d389caa1 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 11 Dec 2009 17:00:49 +0200 Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List)) -- added updating of participant list to display participants not in voice as disabled. Unfortunatly I have to perform refreshing in a draw to mad it workable till beta 0. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 4ab5ea1812..e6a6910d6d 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -82,6 +82,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mVoiceType(VC_LOCAL_CHAT) { mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); + LLVoiceClient::getInstance()->addObserver(this); } LLCallFloater::~LLCallFloater() @@ -89,6 +90,13 @@ LLCallFloater::~LLCallFloater() mChannelChangedConnection.disconnect(); delete mPaticipants; mPaticipants = NULL; + + // Don't use LLVoiceClient::getInstance() here + // singleton MAY have already been destroyed. + if(gVoiceClient) + { + gVoiceClient->removeObserver(this); + } } // virtual @@ -121,6 +129,26 @@ void LLCallFloater::onOpen(const LLSD& /*key*/) { } +// virtual +void LLCallFloater::draw() +{ + // we have to refresh participants to display ones not in voice as disabled. + // It should be done only when she joins or leaves voice chat. + // But seems that LLVoiceClientParticipantObserver is not enough to satisfy this requirement. + // *TODO: mantipov: remove from draw() + onChange(); + LLDockableFloater::draw(); +} + +// virtual +void LLCallFloater::onChange() +{ + if (NULL == mPaticipants) return; + + mPaticipants->refreshVoiceState(); +} + + ////////////////////////////////////////////////////////////////////////// /// PRIVATE SECTION ////////////////////////////////////////////////////////////////////////// @@ -231,6 +259,7 @@ void LLCallFloater::refreshPartisipantList() { mAvatarList->setNoItemsCommentText(getString("no_one_near")); } + mPaticipants->refreshVoiceState(); } } -- cgit v1.2.3 From f0188645c72126782f08f27fe7104d73e635ddb9 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 11 Dec 2009 18:38:29 +0200 Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List)) -- added showing notification that user was muted by moderator --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index e6a6910d6d..87863e829d 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -33,6 +33,8 @@ #include "llviewerprecompiledheaders.h" +#include "llnotificationsutil.h" + #include "llcallfloater.h" #include "llagent.h" @@ -80,6 +82,8 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mAvatarList(NULL) , mNonAvatarCaller(NULL) , mVoiceType(VC_LOCAL_CHAT) +, mSpeakingIndicator(NULL) +, mIsModeratorMutedVoice(false) { mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::getInstance()->addObserver(this); @@ -137,6 +141,14 @@ void LLCallFloater::draw() // But seems that LLVoiceClientParticipantObserver is not enough to satisfy this requirement. // *TODO: mantipov: remove from draw() onChange(); + + bool is_moderator_muted = gVoiceClient->getIsModeratorMuted(gAgentID); + + if (mIsModeratorMutedVoice != is_moderator_muted) + { + setModeratorMutedVoice(is_moderator_muted); + } + LLDockableFloater::draw(); } @@ -313,8 +325,19 @@ void LLCallFloater::initAgentData() gCacheName->getFullName(gAgentID, name); my_panel->childSetValue("user_text", name); - LLOutputMonitorCtrl* speaking_indicator = my_panel->getChild("speaking_indicator"); - speaking_indicator->setSpeakerId(gAgentID); + mSpeakingIndicator = my_panel->getChild("speaking_indicator"); + mSpeakingIndicator->setSpeakerId(gAgentID); + } +} + +void LLCallFloater::setModeratorMutedVoice(bool moderator_muted) +{ + mIsModeratorMutedVoice = moderator_muted; + + if (moderator_muted) + { + LLNotificationsUtil::add("VoiceIsMutedByModerator"); } + mSpeakingIndicator->setIsMuted(moderator_muted); } //EOF -- cgit v1.2.3 From a5f4531315f8f8c5711e2298019586c6ae0dba76 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 11 Dec 2009 19:56:45 +0200 Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List)) -- added showing Moderator label near the agent's name if she is a group moderator --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 87863e829d..75fc9f1f7b 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -34,6 +34,7 @@ #include "llviewerprecompiledheaders.h" #include "llnotificationsutil.h" +#include "lltrans.h" #include "llcallfloater.h" @@ -82,6 +83,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mAvatarList(NULL) , mNonAvatarCaller(NULL) , mVoiceType(VC_LOCAL_CHAT) +, mAgentPanel(NULL) , mSpeakingIndicator(NULL) , mIsModeratorMutedVoice(false) { @@ -239,6 +241,7 @@ void LLCallFloater::updateSession() childSetVisible("leave_btn_panel", !is_local_chat); refreshPartisipantList(); + updateModeratorState(); } void LLCallFloater::refreshPartisipantList() @@ -315,17 +318,17 @@ void LLCallFloater::updateTitle() void LLCallFloater::initAgentData() { - LLPanel* my_panel = getChild ("my_panel"); + mAgentPanel = getChild ("my_panel"); - if ( my_panel ) + if ( mAgentPanel ) { - my_panel->childSetValue("user_icon", gAgentID); + mAgentPanel->childSetValue("user_icon", gAgentID); std::string name; gCacheName->getFullName(gAgentID, name); - my_panel->childSetValue("user_text", name); + mAgentPanel->childSetValue("user_text", name); - mSpeakingIndicator = my_panel->getChild("speaking_indicator"); + mSpeakingIndicator = mAgentPanel->getChild("speaking_indicator"); mSpeakingIndicator->setSpeakerId(gAgentID); } } @@ -340,4 +343,21 @@ void LLCallFloater::setModeratorMutedVoice(bool moderator_muted) } mSpeakingIndicator->setIsMuted(moderator_muted); } + +void LLCallFloater::updateModeratorState() +{ + std::string name; + gCacheName->getFullName(gAgentID, name); + + if(gAgent.isInGroup(mSpeakerManager->getSessionID())) + { + // Agent is Moderator + if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator) + { + const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); + name += " " + moderator_indicator; + } + } + mAgentPanel->childSetValue("user_text", name); +} //EOF -- cgit v1.2.3 From d345153bfe6065efc990d829722de55d45a551d8 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 14 Dec 2009 10:38:16 +0200 Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List)) -- Fixed crash if press Call button quickly in just opened IM Group floater Reason: voice channel is in STATE_NO_CHANNEL_INFO, in this case there are no any speakers yet. Fix: added NULL validating of finding speaker before determining if Agent is a moderator. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 75fc9f1f7b..785591e7e3 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -351,11 +351,17 @@ void LLCallFloater::updateModeratorState() if(gAgent.isInGroup(mSpeakerManager->getSessionID())) { - // Agent is Moderator - if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator) + // This method can be called when LLVoiceChannel.mState == STATE_NO_CHANNEL_INFO + // in this case there are no any speakers yet. + if (mSpeakerManager->findSpeaker(gAgentID)) { - const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); - name += " " + moderator_indicator; + // Agent is Moderator + if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator) + + { + const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); + name += " " + moderator_indicator; + } } } mAgentPanel->childSetValue("user_text", name); -- cgit v1.2.3 From 6f7b7ef32bb6258ccaf5d5df60a5ede2101ae5de Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Mon, 14 Dec 2009 18:05:24 +0200 Subject: Fixed critical bug EXT-3427 - Viewer chashes if select Moderator Options submenu in Voice controls quickly. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 785591e7e3..4f1164788d 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -280,6 +280,10 @@ void LLCallFloater::refreshPartisipantList() void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) { + if(LLVoiceChannel::STATE_NO_CHANNEL_INFO == LLVoiceChannel::getCurrentVoiceChannel()->getState()) + { + return; + } // Forget speaker manager from the previous session to avoid using it after session was destroyed. mSpeakerManager = NULL; updateSession(); -- cgit v1.2.3 From d06742958c3f28cd62e5752aadc107ff98718512 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Mon, 14 Dec 2009 19:14:16 +0200 Subject: Update for critical bug EXT-3427 - Viewer chashes if select Moderator Options submenu in Voice controls quickly. Added code to hide menu before destroying it. Added aditional checks. Added comments --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 4f1164788d..2f5523e04d 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -280,7 +280,11 @@ void LLCallFloater::refreshPartisipantList() void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) { - if(LLVoiceChannel::STATE_NO_CHANNEL_INFO == LLVoiceChannel::getCurrentVoiceChannel()->getState()) + // Don't update participant list if no channel info is available. + // Fix for ticket EXT-3427 + // @see LLParticipantList::~LLParticipantList() + if(LLVoiceChannel::getCurrentVoiceChannel() && + LLVoiceChannel::STATE_NO_CHANNEL_INFO == LLVoiceChannel::getCurrentVoiceChannel()->getState()) { return; } -- cgit v1.2.3