From 08f1e05552796f2f0d67f95aefca181ca96c5615 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Mon, 2 Nov 2009 21:51:39 +0200 Subject: fixed major bug EXT-1984 Speak button light should not disable when voice channel is open --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 1 + indra/newview/lloutputmonitorctrl.cpp | 12 ++++++++++-- indra/newview/lloutputmonitorctrl.h | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index bad61101c1..a854eb852f 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1336,6 +1336,7 @@ LLTalkButton::LLTalkButton(const Params& p) // never show "muted" because you can't mute yourself mOutputMonitor->setIsMuted(false); + mOutputMonitor->setIsAgentControl(true); } LLTalkButton::~LLTalkButton() diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 8bac9937f0..39381e3faa 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -80,7 +80,8 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p) mImageLevel2(p.image_level_2), mImageLevel3(p.image_level_3), mAutoUpdate(p.auto_update), - mSpeakerId(p.speaker_id) + mSpeakerId(p.speaker_id), + mIsAgentControl(false) { //static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange); //static LLUIColor output_monitor_overdriven_color = LLUIColorTable::instance().getColor("OutputMonitorOverdrivenColor", LLColor4::red); @@ -132,7 +133,14 @@ void LLOutputMonitorCtrl::draw() if (getVisible() && mAutoUpdate && !mIsMuted && mSpeakerId.notNull()) { setPower(gVoiceClient->getCurrentPower(mSpeakerId)); - setIsTalking(gVoiceClient->getIsSpeaking(mSpeakerId)); + if(mIsAgentControl) + { + setIsTalking(gVoiceClient->getUserPTTState()); + } + else + { + setIsTalking(gVoiceClient->getIsSpeaking(mSpeakerId)); + } } LLPointer icon; diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 7a7b8bc3a1..85ea552a57 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -81,6 +81,8 @@ public: // For the current user, need to know the PTT state to show // correct button image. + void setIsAgentControl(bool val) { mIsAgentControl = val; } + void setIsTalking(bool val) { mIsTalking = val; } void setSpeakerId(const LLUUID& speaker_id); @@ -100,6 +102,7 @@ private: F32 mPower; + bool mIsAgentControl; bool mIsMuted; bool mIsTalking; LLPointer mImageMute; -- cgit v1.2.3