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.
parent
ba770ee4ac
commit
ccb91c6da4
|
|
@ -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()
|
||||
{
|
||||
LLAgent::toggleMicrophone("speak");
|
||||
LLVoiceClient::getInstance()->inputUserControlState(true);
|
||||
updateSpeakBtnState();
|
||||
}
|
||||
|
||||
void LLFloaterIMContainer::onSpeakButtonReleased()
|
||||
{
|
||||
LLVoiceClient::getInstance()->inputUserControlState(false);
|
||||
updateSpeakBtnState();
|
||||
}
|
||||
|
||||
void LLFloaterIMContainer::onExpandCollapseButtonClicked()
|
||||
{
|
||||
if (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed()
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue