diff options
| author | Steve Bennetts <steve@lindenlab.com> | 2009-11-04 19:15:12 -0800 |
|---|---|---|
| committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-04 19:15:12 -0800 |
| commit | af401ac6dc463db477210b0ff100014fbeb50a9a (patch) | |
| tree | 6bb39558de0208fc05af074fb5efe8498a493c4a /indra/newview/llvoicechannel.cpp | |
| parent | 4656c5671cfe523e351b5c91ae45d5026fb69e04 (diff) | |
| parent | 15df55ecafd2f6d72f25988401ddb7ed58030b79 (diff) | |
Merge changes from https://hg.aws.productengine.com/secondlife/viewer-2-0/
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); |
