From c8f6b28c2266caf28787775040be7588f7591e9f Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 25 Aug 2014 13:16:38 -0700 Subject: DD-105 : Disable SLM right click menu options when listing is updating --- indra/newview/llinventorybridge.cpp | 73 ++++++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 26 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index f6a851e55f..8316791695 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -881,39 +881,51 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, items.push_back(std::string("Marketplace Disassociate Listing")); items.push_back(std::string("Marketplace List")); items.push_back(std::string("Marketplace Unlist")); - if (gSavedSettings.getBOOL("MarketplaceListingsLogging")) - { - items.push_back(std::string("Marketplace Get Listing")); + if (LLMarketplaceData::instance().isUpdating(mUUID)) + { + // 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")); } - if (LLMarketplaceData::instance().isListed(mUUID)) + else { - disabled_items.push_back(std::string("Marketplace Create Listing")); - disabled_items.push_back(std::string("Marketplace Associate Listing")); - if (LLMarketplaceData::instance().getVersionFolder(mUUID).isNull()) + if (gSavedSettings.getBOOL("MarketplaceListingsLogging")) { - disabled_items.push_back(std::string("Marketplace List")); - disabled_items.push_back(std::string("Marketplace Unlist")); + items.push_back(std::string("Marketplace Get Listing")); } - else + if (LLMarketplaceData::instance().isListed(mUUID)) { - if (LLMarketplaceData::instance().getActivationState(mUUID)) + disabled_items.push_back(std::string("Marketplace Create Listing")); + disabled_items.push_back(std::string("Marketplace Associate Listing")); + if (LLMarketplaceData::instance().getVersionFolder(mUUID).isNull()) { disabled_items.push_back(std::string("Marketplace List")); + disabled_items.push_back(std::string("Marketplace Unlist")); } else { - disabled_items.push_back(std::string("Marketplace Unlist")); + if (LLMarketplaceData::instance().getActivationState(mUUID)) + { + disabled_items.push_back(std::string("Marketplace List")); + } + else + { + disabled_items.push_back(std::string("Marketplace Unlist")); + } } } - } - 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")) + else { - disabled_items.push_back(std::string("Marketplace Get 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")); + if (gSavedSettings.getBOOL("MarketplaceListingsLogging")) + { + disabled_items.push_back(std::string("Marketplace Get Listing")); + } } } } @@ -925,17 +937,26 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, { items.push_back(std::string("Marketplace Activate")); items.push_back(std::string("Marketplace Deactivate")); - if (LLMarketplaceData::instance().isVersionFolder(mUUID)) + if (LLMarketplaceData::instance().isUpdating(mUUID)) { + // During SLM update, disable all marketplace related options disabled_items.push_back(std::string("Marketplace Activate")); - if (LLMarketplaceData::instance().getActivationState(mUUID)) - { - disabled_items.push_back(std::string("Marketplace Deactivate")); - } + disabled_items.push_back(std::string("Marketplace Deactivate")); } else { - disabled_items.push_back(std::string("Marketplace Deactivate")); + if (LLMarketplaceData::instance().isVersionFolder(mUUID)) + { + disabled_items.push_back(std::string("Marketplace Activate")); + if (LLMarketplaceData::instance().getActivationState(mUUID)) + { + disabled_items.push_back(std::string("Marketplace Deactivate")); + } + } + else + { + disabled_items.push_back(std::string("Marketplace Deactivate")); + } } } } -- cgit v1.2.3