summaryrefslogtreecommitdiff
path: root/indra/newview/llcallfloater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llcallfloater.cpp')
-rw-r--r--indra/newview/llcallfloater.cpp22
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