diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-11-17 12:37:00 -0800 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-17 12:37:00 -0800 |
commit | 3b3fa1c0ab74546538a02a69098afc99eddd49f5 (patch) | |
tree | eb9f5c03f4e925aabe0e37b5d5d34e215a6daaba /indra/newview/llvoicechannel.cpp | |
parent | 2365dbcd459b37942ddacbcb7010232113a126c1 (diff) | |
parent | c76ab6c4b7384e34a4f32f2fa820b46f6373cdc3 (diff) |
Merge from product-engine
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index ae32ec7d11..21054dacd0 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" +#include "llfloatercall.h" #include "llfloaterreg.h" #include "llimview.h" #include "llnotifications.h" @@ -408,9 +409,14 @@ void LLVoiceChannel::doSetState(const EState& new_state) void LLVoiceChannel::toggleCallWindowIfNeeded(EState state) { + LLFloaterCall* floater = dynamic_cast<LLFloaterCall*>(LLFloaterReg::getInstance("voice_call", mSessionID)); + if (!floater) + return; + if (state == STATE_CONNECTED) { - LLFloaterReg::showInstance("voice_call", mSessionID); + floater->init(mSessionID); + floater->openFloater(mSessionID); } // By checking that current state is CONNECTED we make sure that the call window // has been shown, hence there's something to hide. This helps when user presses @@ -418,7 +424,8 @@ void LLVoiceChannel::toggleCallWindowIfNeeded(EState state) // *TODO: move this check to LLFloaterCall? else if (state == STATE_HUNG_UP && mState == STATE_CONNECTED) { - LLFloaterReg::hideInstance("voice_call", mSessionID); + floater->reset(); + floater->closeFloater(); } } |