summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index b56383e48f..baf2a40590 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1185,7 +1185,8 @@ bool can_move_folder_to_marketplace(const LLInventoryCategory* root_folder, LLIn
return accept;
}
-bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_folder, bool copy)
+// Local : perform the move at last...
+bool perform_move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_folder, bool copy)
{
// Get the marketplace listings depth of the destination folder, exit with error if not under marketplace
S32 depth = depth_nesting_in_marketplace(dest_folder);
@@ -1286,6 +1287,33 @@ bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_fol
return true;
}
+// Local : Callback for the move item if DAMA required...
+bool callback_move_item_to_marketplacelistings(const LLSD& notification, const LLSD& response, LLInventoryItem* inv_item, LLUUID dest_folder, bool copy)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option == 0) // YES
+ {
+ return perform_move_item_to_marketplacelistings(inv_item, dest_folder, copy);
+ }
+ return false;
+ }
+
+// Public interface: Check if confirmation dialog is required (DAMA) and call it or call the move item function directly
+bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_folder, bool copy)
+{
+ // Merov : Use the following weak test for testing...
+ //if (LLMarketplaceData::instance().isVersionFolder(dest_folder))
+ if (LLMarketplaceData::instance().getActivationState(dest_folder))
+ {
+ LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(callback_move_item_to_marketplacelistings, _1, _2, inv_item, dest_folder, copy));
+ return true;
+ }
+ else
+ {
+ return perform_move_item_to_marketplacelistings(inv_item, dest_folder, copy);
+ }
+}
+
bool move_folder_to_marketplacelistings(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, bool copy)
{
// Check that we have adequate permission on all items being moved. Proceed if we do.