summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloater.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-12 10:55:19 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-12 10:55:19 +0100
commit7059173aa920e9c8d1939a0ec9558fc79cbfb3ed (patch)
tree1e66e2083ad73fcdbc0a76ecf95c33fb20bc63ee /indra/newview/llimfloater.cpp
parent489a5eb9e20256da64749e85254b9511e0919607 (diff)
parent9ab4d2ca8be2edcafa6cdfc3bd774ebaed444dc8 (diff)
merge from PE's viewer-trunk
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r--indra/newview/llimfloater.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 46439150a7..d25aa37e16 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -1154,3 +1154,31 @@ void LLIMFloater::onIMChicletCreated( const LLUUID& session_id )
}
}
+
+void LLIMFloater::onClickCloseBtn()
+{
+
+ LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(
+ mSessionID);
+
+ if (session == NULL)
+ {
+ llwarns << "Empty session." << llendl;
+ return;
+ }
+
+ bool is_call_with_chat = session->isGroupSessionType()
+ || session->isAdHocSessionType() || session->isP2PSessionType();
+
+ LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
+
+ if (is_call_with_chat && voice_channel != NULL && voice_channel->isActive())
+ {
+ LLSD payload;
+ payload["session_id"] = mSessionID;
+ LLNotificationsUtil::add("ConfirmLeaveCall", LLSD(), payload);
+ return;
+ }
+
+ LLFloater::onClickCloseBtn();
+}