From 8193caa7939643d1080ceb9463b3e3978b0f516a Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 20 May 2014 21:40:48 -0700 Subject: DD-88 : Make Drag and Drop tooltips for Merchant Outbox and Marketplace restrictions identical --- indra/newview/llinventorybridge.cpp | 3 --- indra/newview/lltooldraganddrop.cpp | 15 +++++++++++++++ indra/newview/skins/default/xui/en/strings.xml | 4 ++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index c9efb92acc..83403c53f5 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -83,7 +83,6 @@ void copy_slurl_to_clipboard_callback_inv(const std::string& slurl); // Marketplace outbox current disabled #define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 #define ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU 0 -#define BLOCK_WORN_ITEMS_IN_OUTBOX 1 typedef std::pair two_uuids_t; typedef std::list two_uuids_list_t; @@ -2361,14 +2360,12 @@ static BOOL can_move_to_marketplace(LLInventoryItem* inv_item, std::string& tool return false; } -#if BLOCK_WORN_ITEMS_IN_OUTBOX bool worn = get_is_item_worn(inv_item->getUUID()); if (worn) { tooltip_msg = LLTrans::getString("TooltipOutboxWorn"); return false; } -#endif bool calling_card = (LLAssetType::AT_CALLINGCARD == inv_item->getType()); if (calling_card) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 1a137f7129..21d670c307 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -812,6 +812,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, if (!handled) { + // *TODO: Suppress the "outbox" case once "marketplace" is used everywhere for everyone // Disallow drag and drop to 3D from the outbox const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); if (outbox_id.notNull()) @@ -826,6 +827,20 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } } } + // Disallow drag and drop to 3D from the marketplace + const LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); + if (marketplacelistings_id.notNull()) + { + for (S32 item_index = 0; item_index < (S32)mCargoIDs.size(); item_index++) + { + if (gInventory.isObjectDescendentOf(mCargoIDs[item_index], marketplacelistings_id)) + { + *acceptance = ACCEPT_NO; + mToolTipMsg = LLTrans::getString("TooltipOutboxDragToWorld"); + return; + } + } + } dragOrDrop3D( x, y, mask, drop, acceptance ); } diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index ad1af2faa3..18552c3153 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -210,9 +210,9 @@ Please try logging in again in a minute. Only a single item can be dragged here - You can not rez items in your merchant outbox + You can not rez items on the marketplace One or more of these objects cannot be sold or transferred - Your merchant outbox can only accept items directly from your inventory + You can only put items from your inventory on the marketplace You can not put items you are wearing on the marketplace You can not put calling cards on the marketplace Depth of nested folders exceeds 3 -- cgit v1.2.3