From 658ccc3e85487f9f24ff3b5926e60d6cce7f42e0 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 7 Apr 2010 11:08:04 -0700 Subject: Re-insert backed out SLE checkin so we can fix it --- indra/newview/llimfloater.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llimfloater.cpp') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 3ec8d11fb0..9704c7537a 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -58,7 +58,6 @@ #include "lltransientfloatermgr.h" #include "llinventorymodel.h" #include "llrootview.h" - #include "llspeakers.h" -- cgit v1.3 From 9ab4d2ca8be2edcafa6cdfc3bd774ebaed444dc8 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 12 May 2010 11:11:02 +0300 Subject: EXT-7120 FIXED Added confirmation about leaving group, ad-hoc and p2p call. reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/374/ --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 28 ++++++++++++++++++++++ indra/newview/llimfloater.h | 5 ++++ indra/newview/llviewermessage.cpp | 16 +++++++++++++ .../newview/skins/default/xui/en/notifications.xml | 13 ++++++++++ 4 files changed, 62 insertions(+) (limited to 'indra/newview/llimfloater.cpp') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index c0cc3f1985..8549269a56 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -1155,3 +1155,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(); +} diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index f9dd8b9b85..d63246a5cd 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -50,6 +50,7 @@ class LLInventoryCategory; */ class LLIMFloater : public LLTransientDockableFloater { + LOG_CLASS(LLIMFloater); public: LLIMFloater(const LLUUID& session_id); @@ -120,6 +121,10 @@ public: virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } +protected: + /* virtual */ + void onClickCloseBtn(); + private: // process focus events to set a currently active session /* virtual */ void onFocusLost(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 46adb0a46b..71e50cacfd 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6472,3 +6472,19 @@ void LLOfferInfo::forceResponse(InventoryOfferResponse response) params.functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2)); LLNotifications::instance().forceResponse(params, response); } + +static bool confirm_leave_call_callback(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 false; +} +static LLNotificationFunctorRegistration confirm_leave_call_cb("ConfirmLeaveCall", confirm_leave_call_callback); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 149a254f49..cf7cec04de 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5970,6 +5970,19 @@ Drag items from inventory onto a person in the resident picker Avatar '[NAME]' rezzed in [TIME] seconds. + +Are you sure you want to leave this call? + + + + - Your CPU speed does not meet the minimum requirements. -- cgit v1.3