summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-11-05 11:41:07 +0800
committerangela <angela@lindenlab.com>2009-11-05 11:41:07 +0800
commit95738da3d82b92e82744dbc6b377a3feae2e6441 (patch)
treecf1678c617ea644a14d20a40fbfc58f156fd9591 /indra/newview/llvoicechannel.cpp
parent35c7c7a9b29ef4462ea969b393c25b59813ef169 (diff)
parentaf401ac6dc463db477210b0ff100014fbeb50a9a (diff)
merge
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r--indra/newview/llvoicechannel.cpp14
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);