diff options
author | Merov Linden <merov@lindenlab.com> | 2015-06-06 08:38:34 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2015-06-06 08:38:34 -0700 |
commit | 65833cc0c76965848ff71c33261b246482b55c2b (patch) | |
tree | ef72be230add3ababa72cc5312232242301c149b /indra/newview/llinventorybridge.cpp | |
parent | 1d257ab53fa031db7d7adb2f4eda61c37b68b82a (diff) |
DD-316 : Disable New Folder under version folder hierarchy of InventoryOutboxMaxFolderCount has been reached
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 4dbd0e5154..4a82cb5eac 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1049,14 +1049,30 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, } } } - // Options available at all levels on items and categories + items.push_back(std::string("Marketplace Edit Listing")); LLUUID listing_folder_id = nested_parent_id(mUUID,depth); LLUUID version_folder_id = LLMarketplaceData::instance().getVersionFolder(listing_folder_id); + + if (depth >= 2) + { + // Prevent creation of new folders if the max count has been reached on this version folder (active or not) + LLUUID local_version_folder_id = nested_parent_id(mUUID,depth-1); + LLInventoryModel::cat_array_t categories; + LLInventoryModel::item_array_t items; + gInventory.collectDescendents(local_version_folder_id, categories, items, FALSE); + if (categories.size() >= gSavedSettings.getU32("InventoryOutboxMaxFolderCount")) + { + disabled_items.push_back(std::string("New Folder")); + } + } + + // Options available at all levels on items and categories if (!LLMarketplaceData::instance().isListed(listing_folder_id) || version_folder_id.isNull()) { disabled_items.push_back(std::string("Marketplace Edit Listing")); } + // Separator items.push_back(std::string("Marketplace Listings Separator")); } |