From 10591cce8e36e4c27c4a68c68c0502eaa24d8964 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 14 May 2014 15:57:17 -0700 Subject: DD-76, DD-77, DD-90 : recycled can_move_to_outbox() into can_move_to_marketplace() so we have now the same logic for both marketplace and merchant outbox --- indra/newview/llinventorybridge.cpp | 22 +++++++++++++++++----- indra/newview/skins/default/xui/en/strings.xml | 6 +++--- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index f04724ace1..c9efb92acc 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2344,7 +2344,7 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const } -static BOOL can_move_to_outbox(LLInventoryItem* inv_item, std::string& tooltip_msg) +static BOOL can_move_to_marketplace(LLInventoryItem* inv_item, std::string& tooltip_msg) { // Collapse links directly to items/folders LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item; @@ -2622,7 +2622,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, for (S32 i=0; i < descendent_items.count(); ++i) { LLInventoryItem* item = descendent_items[i]; - if (!can_move_to_outbox(item, tooltip_msg)) + if (!can_move_to_marketplace(item, tooltip_msg)) { is_movable = FALSE; break; @@ -2636,6 +2636,18 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // One cannot move a folder into a stock folder is_movable = (getPreferredType() != LLFolderType::FT_MARKETPLACE_STOCK); // *TODO : Merov : Add case if (nesting depth source + depth destination) > marketplace limit -> FALSE + if (is_movable) + { + for (S32 i = 0; i < descendent_items.count(); ++i) + { + LLInventoryItem* item = descendent_items[i]; + if (!can_move_to_marketplace(item, tooltip_msg)) + { + is_movable = FALSE; + break; + } + } + } } if (is_movable) @@ -4398,7 +4410,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } else if (move_is_into_outbox) { - accept = can_move_to_outbox(inv_item, tooltip_msg); + accept = can_move_to_marketplace(inv_item, tooltip_msg); if (accept) { @@ -4427,8 +4439,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { // Check stock folder type matches item type accept = (getCategory() && getCategory()->acceptItem(inv_item)); - // Do not accept calling cards in marketplace listings - accept &= (LLAssetType::AT_CALLINGCARD != inv_item->getType()); + // Check that the object can move into marketplace listings + accept &= can_move_to_marketplace(inv_item, tooltip_msg); } LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index ab7df75216..ad1af2faa3 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -211,10 +211,10 @@ Please try logging in again in a minute. You can not rez items in your merchant outbox - One or more of these objects cannot be sold or transferred. + One or more of these objects cannot be sold or transferred Your merchant outbox can only accept items directly from your inventory - You can not put items you are wearing into your merchant outbox - You can not put calling cards into your merchant outbox + 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 Subfolder count in top-level folder exceeds 20 Item count in top-level folder exceeds 200 -- cgit v1.2.3