From ac01fb0e0378476fd572ba24151d73840f119519 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 19 Dec 2011 13:55:53 -0800 Subject: EXP-1683 FIX -- Add main inventory context menu option Copy To Outbox * The logic to determine whether or not the "Copy to Merchant Outbox" item is available is now tied to drag and drop functionality. --- indra/newview/llinventorybridge.cpp | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3f12067048..d8e0529501 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1102,26 +1102,33 @@ BOOL LLInvFVBridge::canListOnMarketplace() const BOOL LLInvFVBridge::canListOnMarketplaceNow() const { + BOOL can_list = FALSE; + #if ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU -#if BLOCK_WORN_ITEMS_IN_OUTBOX - if (get_is_item_worn(mUUID)) - { - return FALSE; - } + const LLInventoryObject* obj = getInventoryObject(); - // Loop through all items worn by avatar and check to see if they are descendants - // of the item we are trying to list on the marketplace - if (get_is_parent_to_worn_item(mUUID)) + if (obj) { - return FALSE; + // Get outbox id + const LLUUID & outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + LLFolderViewItem * outbox_itemp = mRoot->getItemByID(outbox_id); + + if (outbox_itemp) + { + MASK mask = 0x0; + BOOL drop = FALSE; + EDragAndDropType cargo_type = LLViewerAssetType::lookupDragAndDropType(obj->getActualType()); + void * cargo_data = (void *) obj; + std::string tooltip_msg; + + can_list = outbox_itemp->getListener()->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); + } } -#endif // BLOCK_WORN_ITEMS_IN_OUTBOX - return TRUE; -#else - return FALSE; #endif + + return can_list; } -- cgit v1.2.3