From a09c2ba7ac798386b462745774d01c75102beaaf Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 18 Dec 2009 17:15:54 +0200 Subject: Major task EXT-3466 (Add avatars context menu for nearby voice chat in the voice control panel) --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 1f23840109..b1e530d323 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -270,10 +270,9 @@ void LLCallFloater::refreshPartisipantList() if (!non_avatar_caller) { - bool do_not_use_context_menu_in_local_chat = LLLocalSpeakerMgr::getInstance() != mSpeakerManager; - mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList, do_not_use_context_menu_in_local_chat); + mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList); - if (!do_not_use_context_menu_in_local_chat) + if (LLLocalSpeakerMgr::getInstance() == mSpeakerManager) { mAvatarList->setNoItemsCommentText(getString("no_one_near")); } -- cgit v1.2.3 From f7fadaa807a0652df1da41ac69ab069273605965 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 18 Dec 2009 17:39:01 +0200 Subject: completed EXT-3545 Voice controls panel should auto-open on starting call w/o text chat --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 1f23840109..f60f1e59d7 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -42,6 +42,8 @@ #include "llagentdata.h" // for gAgentID #include "llavatarlist.h" #include "llbottomtray.h" +#include "llimfloater.h" +#include "llfloaterreg.h" #include "llparticipantlist.h" #include "llspeakers.h" #include "lltransientfloatermgr.h" @@ -95,7 +97,6 @@ LLCallFloater::LLCallFloater(const LLSD& key) LLCallFloater::~LLCallFloater() { - mChannelChangedConnection.disconnect(); delete mPaticipants; mPaticipants = NULL; @@ -128,8 +129,6 @@ BOOL LLCallFloater::postBuild() // update list for current session updateSession(); - // subscribe to to be notified Voice Channel is changed - mChannelChangedConnection = LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::onCurrentChannelChanged, this, _1)); return TRUE; } @@ -245,6 +244,17 @@ void LLCallFloater::updateSession() refreshPartisipantList(); updateModeratorState(); + + //show floater for voice calls + if (!is_local_chat) + { + LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + bool show_me = !(im_floater && im_floater->getVisible()); + if (show_me) + { + setVisible(true); + } + } } void LLCallFloater::refreshPartisipantList() @@ -281,7 +291,7 @@ void LLCallFloater::refreshPartisipantList() } } -void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) +void LLCallFloater::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) { // Don't update participant list if no channel info is available. // Fix for ticket EXT-3427 @@ -291,9 +301,11 @@ void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) { return; } + LLCallFloater* call_floater = LLFloaterReg::getTypedInstance("voice_controls"); + // Forget speaker manager from the previous session to avoid using it after session was destroyed. - mSpeakerManager = NULL; - updateSession(); + call_floater->mSpeakerManager = NULL; + call_floater->updateSession(); } void LLCallFloater::updateTitle() -- cgit v1.2.3