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 | |
| 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')
| -rw-r--r-- | indra/newview/llcallfloater.cpp | 22 | ||||
| -rw-r--r-- | indra/newview/llcallfloater.h | 12 | 
2 files changed, 24 insertions, 10 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 diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index db33f17839..bfaa1075c4 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -61,9 +61,19 @@ public:  	/*virtual*/ void onOpen(const LLSD& key);  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 setDefaultSession(); + +	/** +	 * Refreshes participant list according to current Voice Channel +	 */  	void refreshPartisipantList(); +	void onCurrentChannelChanged(const LLUUID& session_id);  private:  	LLSpeakerMgr* mSpeakerManager; | 
