DD-282 : Suppress Unassociate menu item. Confirm when cutting, deleting or moving a listing

meow-7.2.2
Merov Linden 2014-12-22 16:33:47 -08:00
parent b0f590f6ab
commit e8ea398e12
4 changed files with 25 additions and 11 deletions

View File

@ -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)

View File

@ -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;
}
}
}

View File

@ -21,14 +21,6 @@
parameter="marketplace_associate_listing" />
</menu_item_call>
<menu_item_call
label="Unassociate listing"
layout="topleft"
name="Marketplace Disassociate Listing">
<menu_item_call.on_click
function="Inventory.DoToSelected"
parameter="marketplace_disassociate_listing" />
</menu_item_call>
<menu_item_call
label="Get (Refresh) listing"
layout="topleft"
name="Marketplace Get Listing">

View File

@ -369,6 +369,19 @@ Initialization with the Marketplace failed because of a system or network error.
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
name="ConfirmListingCutOrDelete"
type="alertmodal">
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?
<tag>confirm</tag>
<usetemplate
ignoretext="Confirm before I move or delete a listing from the marketplace"
name="okcancelignore"
notext="Cancel"
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
name="ConfirmMerchantUnlist"