From ddb9d0eeadd9d73a2719dbec2feb9c9226e2f00e Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 26 Dec 2014 10:40:41 -0800 Subject: DD-296 : Added contextual menu items to copy and move to the marketplace. Hide copy to merchant outbox. Message when moving to the marketplace. --- indra/newview/llinventorybridge.cpp | 42 +++++++++++++++++++--- .../skins/default/xui/en/menu_inventory.xml | 16 +++++++++ .../newview/skins/default/xui/en/notifications.xml | 13 +++++++ 3 files changed, 66 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1f1017d78e..4e3895ea9d 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -737,11 +737,19 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, { items.push_back(std::string("Marketplace Separator")); - items.push_back(std::string("Merchant Copy")); - if (!canListOnMarketplaceNow()) - { - disabled_items.push_back(std::string("Merchant Copy")); - } + if (gMenuHolder->getChild("MerchantOutbox")->getVisible()) + { + items.push_back(std::string("Merchant Copy")); + if (!canListOnMarketplaceNow()) + { + disabled_items.push_back(std::string("Merchant Copy")); + } + } + if (gMenuHolder->getChild("MarketplaceListings")->getVisible()) + { + items.push_back(std::string("Marketplace Copy")); + items.push_back(std::string("Marketplace Move")); + } } } } @@ -1577,6 +1585,13 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); copy_item_to_outbox(itemp, outbox_id, LLUUID::null, LLToolDragAndDrop::getOperationId()); } + else if (("move_to_marketplace_listings" == action) || ("copy_to_marketplace_listings" == action)) + { + LLInventoryItem* itemp = model->getItem(mUUID); + if (!itemp) return; + const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); + move_item_to_marketplacelistings(itemp, marketplacelistings_id, ("copy_to_marketplace_listings" == action)); + } else if ("copy_slurl" == action) { LLViewerInventoryItem* item = static_cast(getItem()); @@ -2588,6 +2603,11 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, LLNotificationsUtil::add("ConfirmListingCutOrDelete", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_dropCategoryIntoFolder, this, _1, _2, inv_cat)); return true; } + if (move_is_into_marketplacelistings && !move_is_from_marketplacelistings) + { + LLNotificationsUtil::add("ConfirmMerchantMoveInventory", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_dropCategoryIntoFolder, this, _1, _2, inv_cat)); + return true; + } } // Look for any gestures and deactivate them if (move_is_into_trash) @@ -3158,6 +3178,13 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); copy_folder_to_outbox(cat, outbox_id, cat->getUUID(), LLToolDragAndDrop::getOperationId()); } + else if (("move_to_marketplace_listings" == action) || ("copy_to_marketplace_listings" == action)) + { + LLInventoryCategory * cat = gInventory.getCategory(mUUID); + if (!cat) return; + const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); + move_folder_to_marketplacelistings(cat, marketplacelistings_id, ("copy_to_marketplace_listings" == action)); + } } void LLFolderBridge::gatherMessage(std::string& message, LLError::ELevel log_level) @@ -4460,6 +4487,11 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_dropItemIntoFolder, this, _1, _2, inv_item)); return true; } + if (move_is_into_marketplacelistings && !move_is_from_marketplacelistings) + { + LLNotificationsUtil::add("ConfirmMerchantMoveInventory", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_dropItemIntoFolder, this, _1, _2, inv_item)); + return true; + } } //-------------------------------------------------------------------------------- diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 63f408c05c..4187bf9d47 100755 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -785,6 +785,22 @@ parameter="copy_to_outbox" /> + + + + + + diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 4d856ed8a7..bb7f296285 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -369,6 +369,19 @@ Initialization with the Marketplace failed because of a system or network error. yestext="OK"/> + + Items dragged to the Marketplace Items window are moved from their original locations, not copied. Do you want to continue? + confirm + + +