diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llpanelimcontrolpanel.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llpanelimcontrolpanel.h | 2 | 
2 files changed, 8 insertions, 5 deletions
| diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index c15d1973d8..e370f2f622 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -71,7 +71,7 @@ void LLPanelChatControlPanel::onChange(EStatusType status, const std::string &ch  void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)  { -	updateButtons(new_state >= LLVoiceChannel::STATE_CALL_STARTED); +	updateButtons(new_state);  }  void LLPanelChatControlPanel::updateCallButton() @@ -96,12 +96,15 @@ void LLPanelChatControlPanel::updateCallButton()  	getChildView("call_btn")->setEnabled(enable_connect);  } -void LLPanelChatControlPanel::updateButtons(bool is_call_started) +void LLPanelChatControlPanel::updateButtons(LLVoiceChannel::EState state)  { +	bool is_call_started = state >= LLVoiceChannel::STATE_CALL_STARTED;  	getChildView("end_call_btn_panel")->setVisible( is_call_started); -	getChildView("volume_ctrl_panel")->setVisible( is_call_started);  	getChildView("voice_ctrls_btn_panel")->setVisible( is_call_started && findChild<LLView>("voice_ctrls_btn_panel"));  	getChildView("call_btn_panel")->setVisible( ! is_call_started); +	 +	getChildView("volume_ctrl_panel")->setVisible(state == LLVoiceChannel::STATE_CONNECTED); +	  	updateCallButton();  } @@ -136,7 +139,7 @@ void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id)  		mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2));  		//call (either p2p, group or ad-hoc) can be already in started state -		updateButtons(voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); +		updateButtons(voice_channel->getState());  	}  } diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index 76d4475b74..bba847b5d4 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -54,7 +54,7 @@ public:  	virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); -	void updateButtons(bool is_call_started); +	void updateButtons(LLVoiceChannel::EState state);  	// Enables/disables call button depending on voice availability  	void updateCallButton(); | 
