summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsessiontab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index a9d952c05f..8a22447698 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -47,6 +47,7 @@
#include "llfloaterimnearbychat.h"
#include "llgroupiconctrl.h"
#include "lllayoutstack.h"
+#include "llnotificationsutil.h"
#include "llpanelemojicomplete.h"
#include "lltoolbarview.h"
@@ -1442,3 +1443,20 @@ bool LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask )
}
return handled;
}
+
+void LLFloaterIMSessionTab::onClickCloseBtn(bool app_quitting)
+{
+ bool is_ad_hoc = (mSession ? mSession->isAdHocSessionType() : false);
+ if (is_ad_hoc && !app_quitting)
+ {
+ LLNotificationsUtil::add("ConfirmLeaveAdhoc", LLSD(), LLSD(), [this](const LLSD& notification, const LLSD& response)
+ {
+ if (0 == LLNotificationsUtil::getSelectedOption(notification, response))
+ closeFloater();
+ });
+ }
+ else
+ {
+ closeFloater();
+ }
+}