summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 2045c3e297..0d0861efcc 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -930,6 +930,16 @@ void LLAvatarActions::shareWithAvatars(LLView * panel)
}
+//static
+void LLAvatarActions::purgeSelectedItems()
+{
+ const std::set<LLUUID> inventory_selected_uuids = LLAvatarActions::getInventorySelectedUUIDs();
+ if (inventory_selected_uuids.empty()) return;
+ LLSD args;
+ args["COUNT"] = (S32)inventory_selected_uuids.size();
+ LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), &callbackPurgeSelectedItems);
+}
+
// static
bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NULL*/)
{
@@ -1170,6 +1180,24 @@ bool LLAvatarActions::callbackAddFriendWithMessage(const LLSD& notification, con
return false;
}
+bool LLAvatarActions::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option == 0)
+ {
+ const std::set<LLUUID> inventory_selected_uuids = LLAvatarActions::getInventorySelectedUUIDs();
+ if (inventory_selected_uuids.empty()) return false;
+
+ std::set<LLUUID>::const_iterator it = inventory_selected_uuids.begin();
+ const std::set<LLUUID>::const_iterator it_end = inventory_selected_uuids.end();
+ for (; it != it_end; ++it)
+ {
+ remove_inventory_object(*it, NULL);
+ }
+ }
+ return false;
+}
+
// static
bool LLAvatarActions::handleKick(const LLSD& notification, const LLSD& response)
{