diff options
| -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"));  }  | 
