summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-12-19 13:55:53 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-12-19 13:55:53 -0800
commitac01fb0e0378476fd572ba24151d73840f119519 (patch)
treeb6bece6c86d71ca52a28a5bfc2589fdbab6a78ee /indra
parent97a2663cf9fc28a9b651d423f4eb0e506b3c507d (diff)
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.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorybridge.cpp33
1 files 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;
}