diff options
| author | Dave Parks <none@none> | 2010-06-07 23:05:22 -0500 |
|---|---|---|
| committer | Dave Parks <none@none> | 2010-06-07 23:05:22 -0500 |
| commit | f461ae214c8c998f5a0e3661696a30d27ad2814e (patch) | |
| tree | e9430d423ee46fad6cb8319575d37ec925b88e99 /indra/newview/llimfloater.cpp | |
| parent | 84e619a6dc9e5a5967c4ce035ac530a4588f72a5 (diff) | |
| parent | 48809cb3a9350a0357a0fc710140e2437f3e068e (diff) | |
Merge with render-pipeline
Diffstat (limited to 'indra/newview/llimfloater.cpp')
| -rw-r--r-- | indra/newview/llimfloater.cpp | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index c0cc3f1985..3aa9d75bc0 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" @@ -1105,6 +1104,21 @@ void LLIMFloater::closeHiddenIMToasts() channel->closeHiddenToasts(IMToastMatcher()); } } +// static +void LLIMFloater::confirmLeaveCallCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + const LLSD& payload = notification["payload"]; + LLUUID session_id = payload["session_id"]; + + LLFloater* im_floater = LLFloaterReg::findInstance("impanel", session_id); + if (option == 0 && im_floater != NULL) + { + im_floater->closeFloater(); + } + + return; +} // static bool LLIMFloater::isChatMultiTab() @@ -1155,3 +1169,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, confirmLeaveCallCallback); + return; + } + + LLFloater::onClickCloseBtn(); +} |
