diff options
| author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-05-12 11:52:39 +0300 | 
|---|---|---|
| committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-05-12 11:52:39 +0300 | 
| commit | ccb91c6da4078ce5d977203f297b0197983a543e (patch) | |
| tree | 21e2680e5e7c79ea2005107792795a4095adeaab /indra | |
| parent | ba770ee4ac64ce64c3eb9bf2b5a0b9527191e84c (diff) | |
MAINT-3963 FIXED The behavior of speak button in the conversations HUB and toolbar button is consistent now. Use setUserPTTState(false) to switch off the mic.
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/newview/llfloaterimcontainer.cpp | 15 | ||||
| -rwxr-xr-x | indra/newview/llfloaterimcontainer.h | 3 | ||||
| -rwxr-xr-x | indra/newview/llvoicechannel.cpp | 6 | 
3 files changed, 17 insertions, 7 deletions
| diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index a0df37b309..a4b91e47bb 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -229,7 +229,9 @@ BOOL LLFloaterIMContainer::postBuild()  	mStubCollapseBtn = getChild<LLButton>("stub_collapse_btn");  	mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this));      mSpeakBtn = getChild<LLButton>("speak_btn"); -	mSpeakBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this)); + +	mSpeakBtn->setMouseDownCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonPressed, this)); +	mSpeakBtn->setMouseUpCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonReleased, this));  	childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this)); @@ -352,11 +354,18 @@ void LLFloaterIMContainer::onStubCollapseButtonClicked()  	collapseMessagesPane(true);  } -void LLFloaterIMContainer::onSpeakButtonClicked() +void LLFloaterIMContainer::onSpeakButtonPressed() +{ +	LLVoiceClient::getInstance()->inputUserControlState(true); +	updateSpeakBtnState(); +} + +void LLFloaterIMContainer::onSpeakButtonReleased()  { -	LLAgent::toggleMicrophone("speak"); +	LLVoiceClient::getInstance()->inputUserControlState(false);  	updateSpeakBtnState();  } +  void LLFloaterIMContainer::onExpandCollapseButtonClicked()  {  	if (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed() diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index f6d973b9b3..a3e10dc236 100755 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -135,7 +135,8 @@ private:  	void onExpandCollapseButtonClicked();  	void onStubCollapseButtonClicked();  	void processParticipantsStyleUpdate(); -	void onSpeakButtonClicked(); +	void onSpeakButtonPressed(); +	void onSpeakButtonReleased();  	/*virtual*/ void onClickCloseBtn(bool app_quitting = false);  	/*virtual*/ void closeHostedFloater(); diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 312842a70f..48d056b358 100755 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -273,14 +273,14 @@ void LLVoiceChannel::deactivate()  	if (callStarted())  	{  		setState(STATE_HUNG_UP); -		 +  		//Default mic is OFF when leaving voice calls -		if (gSavedSettings.getBOOL("AutoDisengageMic") &&  +		if (gSavedSettings.getBOOL("AutoDisengageMic") &&  			sCurrentVoiceChannel == this &&  			LLVoiceClient::getInstance()->getUserPTTState())  		{  			gSavedSettings.setBOOL("PTTCurrentlyEnabled", true); -			LLVoiceClient::getInstance()->inputUserControlState(true); +			LLVoiceClient::getInstance()->setUserPTTState(false);  		}  	}  	LLVoiceClient::getInstance()->removeObserver(this); | 
