From 40e847d6f1d42ac7a97396de31b362a788638959 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 11 Jun 2014 15:15:02 -0700 Subject: DD-126 : Ask for confirmation when moving a version folder in a way that will deactivate it --- indra/newview/llinventorybridge.cpp | 19 +++++++++++++++---- indra/newview/skins/default/xui/en/notifications.xml | 13 +++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 5e9079775a..ce8f5a76ce 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2487,21 +2487,32 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // Dropping in or out of marketplace needs (sometimes) confirmation if (user_confirm && (move_is_from_marketplacelistings || move_is_into_marketplacelistings)) { - if ((move_is_from_marketplacelistings && LLMarketplaceData::instance().isInActiveFolder(cat_id)) || - (move_is_into_marketplacelistings && LLMarketplaceData::instance().isInActiveFolder(mUUID))) + if (move_is_from_marketplacelistings && LLMarketplaceData::instance().isInActiveFolder(cat_id)) { - if (move_is_from_marketplacelistings && (LLMarketplaceData::instance().isListed(cat_id) || LLMarketplaceData::instance().isVersionFolder(cat_id))) + if (LLMarketplaceData::instance().isListed(cat_id) || LLMarketplaceData::instance().isVersionFolder(cat_id)) { // Move the active version folder or listing folder itself outside marketplace listings will unlist the listing so ask that question specifically LLNotificationsUtil::add("ConfirmMerchantUnlist", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_dropCategoryIntoFolder, this, _1, _2, inv_cat)); } else { - // Any other case will simply modify but not unlist a listing + // Any other case will simply modify but not unlist an active listed listing LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_dropCategoryIntoFolder, this, _1, _2, inv_cat)); } return true; } + if (move_is_from_marketplacelistings && LLMarketplaceData::instance().isVersionFolder(cat_id)) + { + // Moving the version folder from its location will deactivate it. Ask confirmation. + LLNotificationsUtil::add("ConfirmMerchantClearVersion", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_dropCategoryIntoFolder, this, _1, _2, inv_cat)); + return true; + } + if (move_is_into_marketplacelistings && LLMarketplaceData::instance().isInActiveFolder(mUUID)) + { + // Moving something in an active listed listing will modify it. Ask confirmation. + LLNotificationsUtil::add("ConfirmMerchantActiveChange", 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/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b2533b16ec..e30f42ae98 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -332,6 +332,19 @@ Initialization with the Marketplace failed because of a system or network error. yestext="OK"/> + + This action will deactivate the version folder of the current listing. Do you want to continue? + confirm + + +