From 69a01606c1c2ec3fd8622fb74a25c186ce075ece Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 17 Feb 2023 15:24:31 +0100 Subject: [PATCH] FIRE-32736: Add confirmation before ungrouping folder --- indra/newview/llinventoryfunctions.cpp | 15 +++++++++++++++ .../skins/default/xui/de/notifications.xml | 4 ++++ .../skins/default/xui/en/notifications.xml | 14 ++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 4c0b285193..579279d1d8 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2994,6 +2994,18 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root { return; } + + // FIRE-32736: Add confirmation before ungrouping folder + LLSD args; + args["FOLDER_NAME"] = inv_cat->getName(); + LLNotificationsUtil::add("UngroupFolder", args, LLSD(), + [inv_cat](const LLSD& notification, const LLSD& response) + { + S32 opt = LLNotificationsUtil::getSelectedOption(notification, response); + if (opt == 1) + return; + // + const LLUUID &new_cat_uuid = inv_cat->getParentUUID(); LLInventoryModel::cat_array_t* cat_array; LLInventoryModel::item_array_t* item_array; @@ -3019,6 +3031,9 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root } gInventory.removeCategory(inv_cat->getUUID()); gInventory.notifyObservers(); + + }); // FIRE-32736: Add confirmation before ungrouping folder + } } // FIRE-22851: Show texture "Save as" file picker subsequently instead all at once diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 9eb7abb4b9..78d8a0e43c 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -5600,4 +5600,8 @@ URL auf Standard zurücksetzen? [SOURCES] + + Gruppierung durch den Ordner „[FOLDER_NAME]“ aufheben? + + diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b0085f906a..c839aa4880 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -13930,4 +13930,18 @@ Camera reset might be inhibited by the following objects: [SOURCES] + + + Ungroup the folder "[FOLDER_NAME]"? + confirm + + +