diff options
| author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2026-02-17 02:22:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-17 02:22:50 +0200 |
| commit | b3ea509c0b42ff774c52281ea200be634ec49e00 (patch) | |
| tree | 66baf815b0737947aee93da6d926baa9d4387178 | |
| parent | 44c66308389380344b5f598989ca9d1401516c3f (diff) | |
#2938 show confirmation before closing Conference chat
| -rw-r--r-- | indra/newview/llfloaterimsession.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 18 | ||||
| -rw-r--r-- | indra/newview/llfloaterimsessiontab.h | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 16 |
4 files changed, 37 insertions, 1 deletions
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 84a9fad708..6d642638b3 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -142,7 +142,7 @@ void LLFloaterIMSession::onClickCloseBtn(bool app_qutting) { if (app_qutting) { - LLFloaterIMSessionTab::onClickCloseBtn(); + LLFloaterIMSessionTab::onClickCloseBtn(app_qutting); return; } diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 65c13797ac..453161b792 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -48,6 +48,7 @@ #include "llfloaterimnearbychat.h" #include "llgroupiconctrl.h" #include "lllayoutstack.h" +#include "llnotificationsutil.h" #include "llpanelemojicomplete.h" #include "lltoolbarview.h" @@ -1417,3 +1418,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(); + } +} diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index 6d04d622e1..b27ac1b8f9 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -85,6 +85,8 @@ public: void closeFloater(bool app_quitting = false) override; void deleteAllChildren() override; + virtual void onClickCloseBtn(bool app_quitting = false) override; + // Handle the left hand participant list widgets void addConversationViewParticipant(LLConversationItem* item, bool update_view = true); void removeConversationViewParticipant(const LLUUID& participant_id); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index df198e8aed..93ee27b196 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -9694,6 +9694,22 @@ Are you sure you want to leave this call? <notification icon="alertmodal.tga" + name="ConfirmLeaveAdhoc" + type="alertmodal"> +Are you sure you want to leave this conference chat? + <tag>confirm</tag> + <tag>voice</tag> + <usetemplate + ignoretext="Confirm before I leave conference chat" + name="okcancelignore" + notext="No" + yestext="Yes"> + <unique/> + </usetemplate> + </notification> + + <notification + icon="alertmodal.tga" name="ConfirmMuteAll" type="alert"> You have selected to mute all participants in a group call. |
