diff options
author | Eugene Kondrashev <ekondrashev@productengine.com> | 2009-11-04 21:33:14 +0200 |
---|---|---|
committer | Eugene Kondrashev <ekondrashev@productengine.com> | 2009-11-04 21:33:14 +0200 |
commit | eb02d77ff5d20b99cc35fe9082cf5a22f634a7e1 (patch) | |
tree | 80d2e9bb12e6633655b9fa50c52f57105cff2bc1 /indra/newview/llvoicechannel.cpp | |
parent | fbf314cb5593a678e337092186c0e36fed59dbab (diff) |
Implemented major sub-task EXT-2131 - Output monitor contols should only be shown for Group Chat and Adhoc Chat when in a Voice Call. Added onStateChange callback support for voice channel. Added showing/hiding logic of speaking indicator.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 96fcf61e62..cefc88ebee 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -390,7 +390,15 @@ void LLVoiceChannel::setState(EState state) break; } - mState = state; + doSetState(state); +} + +void LLVoiceChannel::doSetState(const EState& new_state) +{ + EState old_state = mState; + mState = new_state; + if (!mStateChangedCallback.empty()) + mStateChangedCallback(old_state, mState); } void LLVoiceChannel::toggleCallWindowIfNeeded(EState state) @@ -620,7 +628,7 @@ void LLVoiceChannelGroup::setState(EState state) gIMMgr->addSystemMessage(mSessionID, "ringing", mNotifyArgs); } - mState = state; + doSetState(state); break; default: LLVoiceChannel::setState(state); @@ -865,7 +873,7 @@ void LLVoiceChannelP2P::setState(EState state) if (mReceivedCall && state == STATE_RINGING) { gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs); - mState = state; + doSetState(state); return; } LLVoiceChannel::setState(state); |