diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llfloatermarketplacelistings.cpp | 17 | ||||
-rwxr-xr-x | indra/newview/llfloatermarketplacelistings.h | 2 | ||||
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 7 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/menu_inventory.xml | 8 |
4 files changed, 30 insertions, 4 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 0be79426c1..f9bfb606c5 100755 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -698,6 +698,9 @@ void LLFloaterAssociateListing::cancel() // LLFloaterMarketplaceValidation //----------------------------------------------------------------------------- +// Note: The key is the UUID of the folder to validate. +// Validates the whole marketplace listings content if UUID is null. + LLFloaterMarketplaceValidation::LLFloaterMarketplaceValidation(const LLSD& key) : LLFloater(key), mEditor(NULL) @@ -732,12 +735,18 @@ void LLFloaterMarketplaceValidation::onOpen(const LLSD& key) { // Clear the text panel mEditor->setValue(LLSD()); + + // Get the folder UUID to validate. Use the whole marketplace listing if none provided. + LLUUID cat_id(key.asUUID()); + if (cat_id.isNull()) + { + cat_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); + } - // Validates the marketplace - LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); - if (marketplacelistings_id.notNull()) + // Validates the folder + if (cat_id.notNull()) { - LLViewerInventoryCategory* cat = gInventory.getCategory(marketplacelistings_id); + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); validate_marketplacelistings(cat, boost::bind(&LLFloaterMarketplaceValidation::appendMessage, this, _1, _2), false); } } diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h index a691872aaa..c5c8043593 100755 --- a/indra/newview/llfloatermarketplacelistings.h +++ b/indra/newview/llfloatermarketplacelistings.h @@ -163,6 +163,8 @@ private: //----------------------------------------------------------------------------- // LLFloaterMarketplaceValidation //----------------------------------------------------------------------------- +// Note: The key is the UUID of the folder to validate. Validates the whole +// marketplace listings content if UUID is null. // Note: For the moment, we just display the validation text. Eventually, we should // get the validation triggered on the server and display the html report. // *TODO : morph into an html/text window using the pattern in llfloatertos diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6b5b0df628..a157460ad5 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -895,6 +895,7 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, // Options available at the Listing Folder level items.push_back(std::string("Marketplace Create Listing")); items.push_back(std::string("Marketplace Associate Listing")); + items.push_back(std::string("Marketplace Check Listing")); items.push_back(std::string("Marketplace List")); items.push_back(std::string("Marketplace Unlist")); if (LLMarketplaceData::instance().isUpdating(mUUID)) @@ -3110,6 +3111,12 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) LLFloaterAssociateListing::show(mUUID); return; } + else if ("marketplace_check_listing" == action) + { + LLSD data(mUUID); + LLFloaterReg::showInstance("marketplace_validation", data); + return; + } else if ("marketplace_edit_listing" == action) { std::string url = LLMarketplaceData::instance().getListingURL(mUUID); diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 4187bf9d47..2f9742f1fe 100755 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -29,6 +29,14 @@ parameter="marketplace_get_listing" /> </menu_item_call> <menu_item_call + label="Check listing" + layout="topleft" + name="Marketplace Check Listing"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="marketplace_check_listing" /> + </menu_item_call> + <menu_item_call label="Edit listing" layout="topleft" name="Marketplace Edit Listing"> |