From 18da8170a7fc635281fae370e7fb43a361a5cc91 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 17 Apr 2014 16:49:28 -0700 Subject: DD-54 : WIP : Improved validation to wrap items and stock items within version folders if necessary. Also hooked up the audit button with the validation code though all printout happens in the log --- indra/newview/llfloatermarketplacelistings.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 869b911310..7db78ff290 100755 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -34,6 +34,7 @@ #include "llinventorybridge.h" #include "llinventorymodelbackgroundfetch.h" #include "llinventoryobserver.h" +#include "llinventoryfunctions.h" #include "llmarketplacefunctions.h" #include "llnotificationhandler.h" #include "llnotificationmanager.h" @@ -60,6 +61,7 @@ BOOL LLPanelMarketplaceListings::postBuild() { mAllPanel = getChild("All Items"); childSetAction("add_btn", boost::bind(&LLPanelMarketplaceListings::onAddButtonClicked, this)); + childSetAction("audit_btn", boost::bind(&LLPanelMarketplaceListings::onAuditButtonClicked, this)); // Set the sort order newest to oldest LLInventoryPanel* panel = getChild("All Items"); @@ -99,7 +101,7 @@ void LLPanelMarketplaceListings::onSelectionChange(LLInventoryPanel *panel, cons void LLPanelMarketplaceListings::onAddButtonClicked() { - LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, true); + LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); llassert(marketplacelistings_id.notNull()); LLFolderType::EType preferred_type = LLFolderType::lookup("category"); LLUUID category = gInventory.createNewCategory(marketplacelistings_id, preferred_type, LLStringUtil::null); @@ -107,6 +109,14 @@ void LLPanelMarketplaceListings::onAddButtonClicked() mAllPanel->setSelectionByID(category, TRUE); } +void LLPanelMarketplaceListings::onAuditButtonClicked() +{ + LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, true); + llassert(marketplacelistings_id.notNull()); + LLViewerInventoryCategory* cat = gInventory.getCategory(marketplacelistings_id); + validate_marketplacelistings(cat); +} + void LLPanelMarketplaceListings::onViewSortMenuItemClicked(const LLSD& userdata) { std::string chosen_item = userdata.asString(); -- cgit v1.2.3