diff options
author | Merov Linden <merov@lindenlab.com> | 2014-04-17 18:09:31 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-04-17 18:09:31 -0700 |
commit | 8ceed54eea0d91598479356a33fc5a4263338cce (patch) | |
tree | a64d77e332898ca6b595b0a5b3986fc02ed22379 | |
parent | 18da8170a7fc635281fae370e7fb43a361a5cc91 (diff) |
DD-54 : Prevent right click actions to destroy live listings or list things without version folders
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 21 |
1 files 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; } |