summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2009-11-18 10:43:30 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2009-11-18 10:43:30 +0000
commit22aa5eed910bbd1b366789cb96247899c744df75 (patch)
tree40bf09c7239e6983b3eb279695b9f662ce4d4d0e /indra/newview/llvoicechannel.cpp
parent939e48d38cf9f15e1f7220cc3860810badd8a778 (diff)
parent125b779fb63cafe4e5df4d601542def1b4bc05f3 (diff)
merge.
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r--indra/newview/llvoicechannel.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index 7036d9ebb6..8f63df8c29 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();
}
}