From e8ea398e123be29227275e8ca5b1d2d0ce7f1e4f Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 22 Dec 2014 16:33:47 -0800 Subject: DD-282 : Suppress Unassociate menu item. Confirm when cutting, deleting or moving a listing --- indra/newview/llinventorybridge.cpp | 9 ++++++--- indra/newview/llinventoryfunctions.cpp | 6 ++++++ indra/newview/skins/default/xui/en/menu_inventory.xml | 8 -------- indra/newview/skins/default/xui/en/notifications.xml | 13 +++++++++++++ 4 files changed, 25 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 62612c1450..1f1017d78e 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -887,7 +887,6 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, // Options available at the Listing Folder level items.push_back(std::string("Marketplace Create Listing")); items.push_back(std::string("Marketplace Associate Listing")); - items.push_back(std::string("Marketplace Disassociate Listing")); items.push_back(std::string("Marketplace List")); items.push_back(std::string("Marketplace Unlist")); if (LLMarketplaceData::instance().isUpdating(mUUID)) @@ -895,7 +894,6 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, // During SLM update, disable all marketplace related options disabled_items.push_back(std::string("Marketplace Create Listing")); disabled_items.push_back(std::string("Marketplace Associate Listing")); - disabled_items.push_back(std::string("Marketplace Disassociate Listing")); disabled_items.push_back(std::string("Marketplace List")); disabled_items.push_back(std::string("Marketplace Unlist")); } @@ -928,7 +926,6 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, } else { - disabled_items.push_back(std::string("Marketplace Disassociate Listing")); disabled_items.push_back(std::string("Marketplace List")); disabled_items.push_back(std::string("Marketplace Unlist")); if (gSavedSettings.getBOOL("MarketplaceListingsLogging")) @@ -2585,6 +2582,12 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_dropCategoryIntoFolder, this, _1, _2, inv_cat)); return true; } + if (move_is_from_marketplacelistings && LLMarketplaceData::instance().isListed(cat_id)) + { + // Moving a whole listing folder will result in archival of SLM data. Ask confirmation. + LLNotificationsUtil::add("ConfirmListingCutOrDelete", 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) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index ddcaf9d2bd..1a75ebbbac 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2194,6 +2194,12 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLInventoryAction::callback_doToSelected, _1, _2, model, root, action)); return; } + // Cutting or deleting a whole listing needs confirmation as SLM will be archived and inaccessible to the user + else if (LLMarketplaceData::instance().isListed(viewModel->getUUID()) && (("cut" == action) || ("delete" == action))) + { + LLNotificationsUtil::add("ConfirmListingCutOrDelete", LLSD(), LLSD(), boost::bind(&LLInventoryAction::callback_doToSelected, _1, _2, model, root, action)); + return; + } } } diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index e28a02550f..63f408c05c 100755 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -21,14 +21,6 @@ parameter="marketplace_associate_listing" /> - - - diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5b0bdc4a0d..4d856ed8a7 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"/> + + Moving or deleting a listing folder will delete your Marketplace listing. If you would like to keep the Marketplace listing, move or delete the contents of the version folder you would like to modify. Do you want to continue? + confirm + + +