summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorygallerymenu.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-06-09 00:34:03 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-06-09 00:34:03 +0300
commita358acf86ddf19aab96ad26a8f4db9cf609bdce7 (patch)
tree1023b199150ab04101e34063ea3cba2532289462 /indra/newview/llinventorygallerymenu.cpp
parentf8823a426383949fb1609fa82b5ebb98ef2c295b (diff)
SL-19845 Show delete confirmation for 'delete' key
Diffstat (limited to 'indra/newview/llinventorygallerymenu.cpp')
-rw-r--r--indra/newview/llinventorygallerymenu.cpp37
1 files changed, 1 insertions, 36 deletions
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index b090434528..54b9294ce1 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -211,15 +211,7 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata, const LLU
}
else if ("delete" == action)
{
- if (!LLInventoryAction::sDeleteConfirmationDisplayed) // ask for the confirmation at least once per session
- {
- LLNotifications::instance().setIgnored("DeleteItems", false);
- LLInventoryAction::sDeleteConfirmationDisplayed = true;
- }
-
- LLSD args;
- args["QUESTION"] = LLTrans::getString("DeleteItem");
- LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryGalleryContextMenu::onDelete, _1, _2, selected_id));
+ mGallery->deleteSelection();
}
else if ("copy" == action)
{
@@ -318,33 +310,6 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata, const LLU
}
}
-void LLInventoryGalleryContextMenu::onDelete(const LLSD& notification, const LLSD& response, const LLUUID& selected_id)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option == 0)
- {
- LLInventoryObject* obj = gInventory.getObject(selected_id);
- if (!obj)
- {
- return;
- }
- if (obj->getType() == LLAssetType::AT_CATEGORY)
- {
- if(get_is_category_removable(&gInventory, selected_id))
- {
- gInventory.removeCategory(selected_id);
- }
- }
- else
- {
- if(get_is_item_removable(&gInventory, selected_id))
- {
- gInventory.removeItem(selected_id);
- }
- }
- }
-}
-
void LLInventoryGalleryContextMenu::onRename(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);