From 58ed680d530daf9852d00d33275594dc713ccdac Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 4 May 2010 20:10:29 +0200 Subject: disable speakers button and hide floateractivespeakers if voice not enabled. --- linden/indra/newview/llvoiceclient.cpp | 2 +- linden/indra/newview/llvoiceremotectrl.cpp | 6 ++++++ linden/indra/newview/llvoiceremotectrl.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 2c46832..c0d73e7 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp @@ -1605,7 +1605,7 @@ void LLVoiceClient::stateMachine() if (count % num == 0) { LL_DEBUGS("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long (" << count << ")." << LL_ENDL; - if (num < 1000) + if (num < 100) { if( ++count2 == 10) { diff --git a/linden/indra/newview/llvoiceremotectrl.cpp b/linden/indra/newview/llvoiceremotectrl.cpp index 73d8c10..1681e96 100644 --- a/linden/indra/newview/llvoiceremotectrl.cpp +++ b/linden/indra/newview/llvoiceremotectrl.cpp @@ -48,6 +48,7 @@ LLVoiceRemoteCtrl::LLVoiceRemoteCtrl (const std::string& name) : LLPanel(name) { + mVoiceLastActive = false; setIsChrome(TRUE); if (gSavedSettings.getBOOL("ShowVoiceChannelPopup")) @@ -107,6 +108,11 @@ void LLVoiceRemoteCtrl::draw() mTalkBtn->setEnabled(voice_active); mTalkLockBtn->setEnabled(voice_active); + mSpeakersBtn->setEnabled(voice_active); + + if (!voice_active && mVoiceLastActive) + LLFloaterActiveSpeakers::getInstance()->onClose(false); + mVoiceLastActive = voice_active; // propagate ptt state to button display, if (!mTalkBtn->hasMouseCapture()) diff --git a/linden/indra/newview/llvoiceremotectrl.h b/linden/indra/newview/llvoiceremotectrl.h index 1f61459..6a2da78 100644 --- a/linden/indra/newview/llvoiceremotectrl.h +++ b/linden/indra/newview/llvoiceremotectrl.h @@ -59,6 +59,7 @@ protected: LLButton* mTalkBtn; LLButton* mTalkLockBtn; LLButton* mSpeakersBtn; + bool mVoiceLastActive; }; #endif // LL_LLVOICEREMOTECTRL_H -- cgit v1.1