Skip to content
Snippets Groups Projects
Commit b8cb1e4f authored by Mike Antipov's avatar Mike Antipov
Browse files

Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater)...

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
parent 90e85022
No related branches found
No related tags found
No related merge requests found
...@@ -69,13 +69,17 @@ BOOL LLCallFloater::postBuild() ...@@ -69,13 +69,17 @@ BOOL LLCallFloater::postBuild()
anchor_panel, this, anchor_panel, this,
getDockTongue(), LLDockControl::TOP)); 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; return TRUE;
} }
// virtual // virtual
void LLCallFloater::onOpen(const LLSD& /*key*/) void LLCallFloater::onOpen(const LLSD& /*key*/)
{ {
updateSession();
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
...@@ -110,19 +114,14 @@ void LLCallFloater::updateSession() ...@@ -110,19 +114,14 @@ void LLCallFloater::updateSession()
if (NULL == mSpeakerManager) if (NULL == mSpeakerManager)
{ {
setDefaultSession(); // by default let show nearby chat participants
mSpeakerManager = LLLocalSpeakerMgr::getInstance();
lldebugs << "Set DEFAULT speaker manager" << llendl;
} }
refreshPartisipantList(); refreshPartisipantList();
} }
void LLCallFloater::setDefaultSession()
{
// by default let show nearby chat participants
mSpeakerManager = LLLocalSpeakerMgr::getInstance();
lldebugs << "Set DEFAULT speaker manager" << llendl;
}
void LLCallFloater::refreshPartisipantList() void LLCallFloater::refreshPartisipantList()
{ {
delete mPaticipants; delete mPaticipants;
...@@ -131,4 +130,9 @@ void LLCallFloater::refreshPartisipantList() ...@@ -131,4 +130,9 @@ void LLCallFloater::refreshPartisipantList()
bool do_not_use_context_menu_in_local_chat = LLLocalSpeakerMgr::getInstance() != mSpeakerManager; 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, do_not_use_context_menu_in_local_chat);
} }
void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/)
{
updateSession();
}
//EOF //EOF
...@@ -61,9 +61,19 @@ class LLCallFloater : public LLDockableFloater ...@@ -61,9 +61,19 @@ class LLCallFloater : public LLDockableFloater
/*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onOpen(const LLSD& key);
private: private:
/**
* Updates mSpeakerManager and list according to current Voice Channel
*
* It compares mSpeakerManager & current Voice Channel session IDs.
* If they are different gets Speaker manager related to current channel and updates channel participant list.
*/
void updateSession(); void updateSession();
void setDefaultSession();
/**
* Refreshes participant list according to current Voice Channel
*/
void refreshPartisipantList(); void refreshPartisipantList();
void onCurrentChannelChanged(const LLUUID& session_id);
private: private:
LLSpeakerMgr* mSpeakerManager; LLSpeakerMgr* mSpeakerManager;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment