From 8ceed54eea0d91598479356a33fc5a4263338cce Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 17 Apr 2014 18:09:31 -0700 Subject: DD-54 : Prevent right click actions to destroy live listings or list things without version folders --- indra/newview/llinventorybridge.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 749fcd7a71..6dd181501a 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -863,13 +863,21 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, { disabled_items.push_back(std::string("Marketplace Create Listing")); disabled_items.push_back(std::string("Marketplace Associate Listing")); - if (LLMarketplaceData::instance().getActivationState(mUUID)) + if (LLMarketplaceData::instance().getVersionFolderID(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 @@ -890,6 +898,10 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, 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 { @@ -2175,6 +2187,11 @@ BOOL LLFolderBridge::isItemRemovable() const return FALSE; } } + + if (isMarketplaceListingsFolder() && LLMarketplaceData::instance().getActivationState(mUUID)) + { + return FALSE; + } return TRUE; } -- cgit v1.2.3