From fd337f2c43470df43e4145fc4a88250688a45c97 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 4 May 2017 10:55:03 +0300 Subject: MAINT-7357 Disable delete function of the Backspace key on Windows --- indra/newview/llinventorypanel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index bd15ba4975..9de0633edb 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1482,7 +1482,9 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) } break; case KEY_DELETE: +#if LL_DARWIN case KEY_BACKSPACE: +#endif // Delete selected items if delete or backspace key hit on the inventory panel // Note: on Mac laptop keyboards, backspace and delete are one and the same if (isSelectionRemovable() && (mask == MASK_NONE)) -- cgit v1.2.3 From fb7be87bebd785a7a3e7a7b59103bc952d98dc83 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 8 May 2017 18:05:10 +0300 Subject: MAINT-7354 correction to misbehaving 'purge' and notification spam. --- indra/newview/llinventorypanel.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 9de0633edb..a00dcf02ab 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -168,6 +168,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2)); + mCommitCallbackRegistrar.add("Inventory.Purge", boost::bind(&LLInventoryPanel::purgeSelectedItems, this)); } LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id ) @@ -1211,6 +1212,21 @@ void LLInventoryPanel::fileUploadLocation(const LLSD& userdata) } } +void LLInventoryPanel::purgeSelectedItems() +{ + const std::set inventory_selected = mFolderRoot.get()->getSelectionList(); + if (inventory_selected.empty()) return; + + std::set::const_iterator it = inventory_selected.begin(); + const std::set::const_iterator it_end = inventory_selected.end(); + for (; it != it_end; ++it) + { + LLUUID item_id = static_cast((*it)->getViewModelItem())->getUUID(); + remove_inventory_object(item_id, NULL); + } +} + + bool LLInventoryPanel::attachObject(const LLSD& userdata) { // Copy selected item UUIDs to a vector. -- cgit v1.2.3 From 5bd00f860213ebfa116d7b85fff447af3b87d814 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 15 May 2017 16:47:18 +0300 Subject: MAINT-7383 show notifications for Purge item action in all inventory panels --- indra/newview/llinventorypanel.cpp | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index a00dcf02ab..4b117941a0 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -43,6 +43,7 @@ #include "llinventorybridge.h" #include "llinventoryfunctions.h" #include "llinventorymodelbackgroundfetch.h" +#include "llnotificationsutil.h" #include "llpreview.h" #include "llsidepanelinventory.h" #include "lltrans.h" @@ -168,7 +169,6 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2)); - mCommitCallbackRegistrar.add("Inventory.Purge", boost::bind(&LLInventoryPanel::purgeSelectedItems, this)); } LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id ) @@ -1216,17 +1216,29 @@ void LLInventoryPanel::purgeSelectedItems() { const std::set inventory_selected = mFolderRoot.get()->getSelectionList(); if (inventory_selected.empty()) return; + LLSD args; + args["COUNT"] = (S32)inventory_selected.size(); + LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(&LLInventoryPanel::callbackPurgeSelectedItems, this, _1, _2)); +} - std::set::const_iterator it = inventory_selected.begin(); - const std::set::const_iterator it_end = inventory_selected.end(); - for (; it != it_end; ++it) +void LLInventoryPanel::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) { - LLUUID item_id = static_cast((*it)->getViewModelItem())->getUUID(); - remove_inventory_object(item_id, NULL); + const std::set inventory_selected = mFolderRoot.get()->getSelectionList(); + if (inventory_selected.empty()) return; + + std::set::const_iterator it = inventory_selected.begin(); + const std::set::const_iterator it_end = inventory_selected.end(); + for (; it != it_end; ++it) + { + LLUUID item_id = static_cast((*it)->getViewModelItem())->getUUID(); + remove_inventory_object(item_id, NULL); + } } } - bool LLInventoryPanel::attachObject(const LLSD& userdata) { // Copy selected item UUIDs to a vector. @@ -1464,6 +1476,11 @@ void LLInventoryPanel::updateSelection() void LLInventoryPanel::doToSelected(const LLSD& userdata) { + if (("purge" == userdata.asString())) + { + purgeSelectedItems(); + return; + } LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), userdata.asString()); return; -- cgit v1.2.3