diff options
author | Mike Antipov <mantipov@productengine.com> | 2009-11-27 14:53:46 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2009-11-27 14:53:46 +0200 |
commit | b8cb1e4f50b209a018b27d3d2d8e24af61aeb6e1 (patch) | |
tree | b09af7599a4c38355e299e6bf99742603cbd7945 /indra/newview/llcallfloater.cpp | |
parent | 90e85022eb7c0f1f2de88636ad8a53dc7fba41d2 (diff) |
Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel))
-- implemented refreshing of the participant list when Voice Channel is changed
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llcallfloater.cpp')
-rw-r--r-- | indra/newview/llcallfloater.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index c8d50ceb10..b41f962ffa 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -69,13 +69,17 @@ BOOL LLCallFloater::postBuild() anchor_panel, this, getDockTongue(), LLDockControl::TOP)); + // update list for current session + updateSession(); + + // subscribe to to be notified Voice Channel is changed + LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::onCurrentChannelChanged, this, _1)); return TRUE; } // virtual void LLCallFloater::onOpen(const LLSD& /*key*/) { - updateSession(); } ////////////////////////////////////////////////////////////////////////// @@ -110,19 +114,14 @@ void LLCallFloater::updateSession() if (NULL == mSpeakerManager) { - setDefaultSession(); + // by default let show nearby chat participants + mSpeakerManager = LLLocalSpeakerMgr::getInstance(); + lldebugs << "Set DEFAULT speaker manager" << llendl; } refreshPartisipantList(); } -void LLCallFloater::setDefaultSession() -{ - // by default let show nearby chat participants - mSpeakerManager = LLLocalSpeakerMgr::getInstance(); - lldebugs << "Set DEFAULT speaker manager" << llendl; -} - void LLCallFloater::refreshPartisipantList() { delete mPaticipants; @@ -131,4 +130,9 @@ void LLCallFloater::refreshPartisipantList() 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); } + +void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) +{ + updateSession(); +} //EOF |