diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llconversationmodel.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llconversationmodel.h | 3 | ||||
| -rw-r--r-- | indra/newview/llconversationview.cpp | 14 | ||||
| -rw-r--r-- | indra/newview/llconversationview.h | 1 | ||||
| -rw-r--r-- | indra/newview/lloutputmonitorctrl.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/lloutputmonitorctrl.h | 6 | 
6 files changed, 30 insertions, 5 deletions
| diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index bea1f78284..c715815208 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -351,7 +351,7 @@ void LLConversationItemSession::setParticipantIsMuted(const LLUUID& participant_  	LLConversationItemParticipant* participant = findParticipant(participant_id);  	if (participant)  	{ -		participant->muteVoice(is_muted); +		participant->moderateVoice(is_muted);  	}  } @@ -498,6 +498,7 @@ void LLConversationItemSession::onAvatarNameCache(const LLAvatarName& av_name)  LLConversationItemParticipant::LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) :  	LLConversationItem(display_name,uuid,root_view_model), +	mIsModeratorMuted(false),  	mIsModerator(false),  	mDisplayModeratorLabel(false),  	mDistToAgent(-1.0) @@ -508,6 +509,7 @@ LLConversationItemParticipant::LLConversationItemParticipant(std::string display  LLConversationItemParticipant::LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) :  	LLConversationItem(uuid,root_view_model), +	mIsModeratorMuted(false),  	mIsModerator(false),  	mDisplayModeratorLabel(false),  	mDistToAgent(-1.0) @@ -597,7 +599,7 @@ void LLConversationItemParticipant::setDisplayModeratorRole(bool displayRole)  bool LLConversationItemParticipant::isVoiceMuted()  { -	return LLMuteList::getInstance()->isMuted(mUUID, LLMute::flagVoiceChat); +	return mIsModeratorMuted || LLMuteList::getInstance()->isMuted(mUUID, LLMute::flagVoiceChat);  }  void LLConversationItemParticipant::muteVoice(bool mute_voice) diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 3868bafae4..2da9f03c6c 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -194,8 +194,10 @@ public:  	virtual const std::string& getDisplayName() const { return mDisplayName; }  	bool isVoiceMuted(); +	bool isModeratorMuted() { return mIsModeratorMuted; }  	bool isModerator() const { return mIsModerator; }  	void muteVoice(bool mute_voice); +	void moderateVoice(bool mute_voice) { mIsModeratorMuted = mute_voice; }  	void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; }  	void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); mNeedsRefresh = true; }  	void setDistance(F64 dist) { mDistToAgent = dist; mNeedsRefresh = true; } @@ -216,6 +218,7 @@ private:  	void onAvatarNameCache(const LLAvatarName& av_name);	// callback used by fetchAvatarName  	void updateName(const LLAvatarName& av_name); +	bool mIsModeratorMuted;	         // default is false  	bool mIsModerator;	         // default is false  	bool mDisplayModeratorLabel; // default is false  	std::string mDisplayName; diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 15a8aacd37..dee0a52ce8 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -605,6 +605,20 @@ S32 LLConversationViewParticipant::arrange(S32* width, S32* height)      return arranged;  } +// virtual +void LLConversationViewParticipant::refresh() +{ +	// Refresh the participant view from its model data +	LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(getViewModelItem()); +	participant_model->resetRefresh(); +	 +	// *TODO: We should also do something with vmi->isModerator() to echo that state in the UI somewhat +	mSpeakingIndicator->setIsModeratorMuted(participant_model->isModeratorMuted()); +	 +	// Do the regular upstream refresh +	LLFolderViewItem::refresh(); +} +  void LLConversationViewParticipant::addToFolder(LLFolderViewFolder* folder)  {      // Add the item to the folder (conversation) diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 5a74974302..06ffb517bb 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -136,6 +136,7 @@ public:      virtual ~LLConversationViewParticipant( void );      bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } +    /*virtual*/ void refresh();      void addToFolder(LLFolderViewFolder* folder);  	void addToSession(const LLUUID& session_id); diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 6c26073d5b..c5e4593b79 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -72,6 +72,7 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p)  	mImageLevel3(p.image_level_3),  	mAutoUpdate(p.auto_update),  	mSpeakerId(p.speaker_id), +	mIsModeratorMuted(false),  	mIsAgentControl(false),  	mIndicatorToggled(false),  	mShowParticipantsSpeaking(false) @@ -124,7 +125,7 @@ void LLOutputMonitorCtrl::draw()  	const F32 LEVEL_1 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL * 2.f / 3.f;  	const F32 LEVEL_2 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL; -	if (getVisible() && mAutoUpdate && !mIsMuted && mSpeakerId.notNull()) +	if (getVisible() && mAutoUpdate && !getIsMuted() && mSpeakerId.notNull())  	{  		setPower(LLVoiceClient::getInstance()->getCurrentPower(mSpeakerId));  		if(mIsAgentControl) @@ -156,7 +157,7 @@ void LLOutputMonitorCtrl::draw()  	}  	LLPointer<LLUIImage> icon; -	if (mIsMuted) +	if (getIsMuted())  	{  		icon = mImageMute;  	} diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 0682af1278..af52a81b04 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -72,7 +72,10 @@ public:  	void			setPower(F32 val);  	F32				getPower(F32 val) const { return mPower; } -	 + +	bool			getIsMuted() const { return (mIsMuted || mIsModeratorMuted); } +	void			setIsModeratorMuted(bool val) { mIsModeratorMuted = val; } +  	// For the current user, need to know the PTT state to show  	// correct button image.  	void			setIsAgentControl(bool val) { mIsAgentControl = val; } @@ -131,6 +134,7 @@ private:  	F32				mPower;  	bool			mIsAgentControl; +	bool			mIsModeratorMuted;  	bool			mIsMuted;  	bool			mIsTalking;  	bool			mShowParticipantsSpeaking; | 
