diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-12 11:44:16 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-12 11:44:16 +0100 |
commit | 3d39634cbd3abe4df7b9ce8d229e59c3087de713 (patch) | |
tree | 91c436bb6370e511fc2679e8f7b7ca22b7114f70 /indra/newview/llimfloater.cpp | |
parent | 4a3222d9c12812db70f2c9ec0050012d01155565 (diff) | |
parent | 1cee577ca0234eee7da243c85be8eb7524d691c7 (diff) |
merge from viewer-public
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r-- | indra/newview/llimfloater.cpp | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index c0cc3f1985..d25aa37e16 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -59,7 +59,6 @@ #include "lltransientfloatermgr.h" #include "llinventorymodel.h" #include "llrootview.h" - #include "llspeakers.h" @@ -1155,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(); +} |