summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-08-17 22:53:13 -0700
committerMerov Linden <merov@lindenlab.com>2014-08-17 22:53:13 -0700
commit9e7caa2e1439eb75df30c0c03aab782c414b44bd (patch)
treed3d301272aeb9f2621ca35c18615613728063f8b /indra/newview/llinventorybridge.cpp
parent906927a99ff15a1441b629c58fd3f5a150820c47 (diff)
DD-112 : Disable New Folder, Cut and Delete on the Marketplace Listings folder
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rwxr-xr-xindra/newview/llinventorybridge.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 3635a87881..ad462648c1 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3551,9 +3551,10 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
LLInventoryModel* model = getInventoryModel();
llassert(model != NULL);
- const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
- const LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
- const LLUUID favorites = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
+ const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
+ const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
+ const LLUUID &favorites = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
+ const LLUUID &marketplace_listings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
if (lost_and_found_id == mUUID)
{
@@ -3575,6 +3576,12 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
{
addMarketplaceContextMenuOptions(flags, items, disabled_items);
}
+ if (marketplace_listings_id == mUUID)
+ {
+ disabled_items.push_back(std::string("New Folder"));
+ disabled_items.push_back(std::string("Cut"));
+ disabled_items.push_back(std::string("Delete"));
+ }
if(trash_id == mUUID)
{
// This is the trash.
@@ -3669,7 +3676,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
}
// Add menu items that are dependent on the contents of the folder.
LLViewerInventoryCategory* category = (LLViewerInventoryCategory *) model->getCategory(mUUID);
- if (category)
+ if (category && (marketplace_listings_id != mUUID))
{
uuid_vec_t folders;
folders.push_back(category->getUUID());