summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDenis Serdjuk <dserduk@productengine.com>2009-11-02 21:51:39 +0200
committerDenis Serdjuk <dserduk@productengine.com>2009-11-02 21:51:39 +0200
commit08f1e05552796f2f0d67f95aefca181ca96c5615 (patch)
tree84548e2be77df731237e15b3c8bfe00deea7a0f6 /indra
parentd4a3ccc52cf0c9113428c71280a9e4d28f781bfd (diff)
fixed major bug EXT-1984 Speak button light should not disable when voice channel is open
--HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llchiclet.cpp1
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp12
-rw-r--r--indra/newview/lloutputmonitorctrl.h3
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<LLUIImage> 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<LLUIImage> mImageMute;