From a030b30d34ef3152791b123c4f52d4086f3eb549 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 6 Mar 2014 18:15:51 -0800 Subject: DD-4, DD-5, DD-6, DD-7, DD-8: WIP : Add Merchant Items panel and make it somewhat work, in a clunky sort of way --- indra/llcommon/llfoldertype.cpp | 2 ++ indra/llcommon/llfoldertype.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llfoldertype.cpp b/indra/llcommon/llfoldertype.cpp index 9c38349cf7..64bc17c422 100755 --- a/indra/llcommon/llfoldertype.cpp +++ b/indra/llcommon/llfoldertype.cpp @@ -96,6 +96,8 @@ LLFolderDictionary::LLFolderDictionary() addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", FALSE)); addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE)); + + addEntry(LLFolderType::FT_MERCHANT_ITEMS, new FolderEntry("merchant", FALSE)); addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE)); }; diff --git a/indra/llcommon/llfoldertype.h b/indra/llcommon/llfoldertype.h index a0c847914f..81f9c0b678 100644 --- a/indra/llcommon/llfoldertype.h +++ b/indra/llcommon/llfoldertype.h @@ -87,6 +87,8 @@ public: FT_BASIC_ROOT = 52, + FT_MERCHANT_ITEMS = 53, + FT_COUNT, FT_NONE = -1 -- cgit v1.3 From 705d4182c8a84728e7f00cf48110c8f9720e4c29 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 13 Mar 2014 16:45:52 -0700 Subject: DD-42 : Rename merchant items to marketplace listings to be consistent with spec --- indra/llcommon/llfoldertype.cpp | 2 +- indra/llcommon/llfoldertype.h | 2 +- indra/newview/llfloateroutbox.cpp | 114 +++++++++---------- indra/newview/llfloateroutbox.h | 12 +- indra/newview/llinventorybridge.cpp | 6 +- indra/newview/llinventorybridge.h | 2 +- indra/newview/llinventorypanel.cpp | 4 +- indra/newview/llviewerfloaterreg.cpp | 2 +- indra/newview/llviewerfoldertype.cpp | 2 +- .../xui/en/floater_marketplace_listings.xml | 121 +++++++++++++++++++++ .../default/xui/en/floater_merchant_items.xml | 121 --------------------- indra/newview/skins/default/xui/en/menu_viewer.xml | 6 +- .../en/panel_marketplace_listings_inventory.xml | 32 ++++++ .../xui/en/panel_merchant_items_inventory.xml | 32 ------ indra/newview/skins/default/xui/en/strings.xml | 6 +- 15 files changed, 232 insertions(+), 232 deletions(-) create mode 100755 indra/newview/skins/default/xui/en/floater_marketplace_listings.xml delete mode 100755 indra/newview/skins/default/xui/en/floater_merchant_items.xml create mode 100755 indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml delete mode 100755 indra/newview/skins/default/xui/en/panel_merchant_items_inventory.xml (limited to 'indra/llcommon') diff --git a/indra/llcommon/llfoldertype.cpp b/indra/llcommon/llfoldertype.cpp index 64bc17c422..5b80189d2a 100755 --- a/indra/llcommon/llfoldertype.cpp +++ b/indra/llcommon/llfoldertype.cpp @@ -97,7 +97,7 @@ LLFolderDictionary::LLFolderDictionary() addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE)); - addEntry(LLFolderType::FT_MERCHANT_ITEMS, new FolderEntry("merchant", FALSE)); + addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new FolderEntry("merchant", FALSE)); addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE)); }; diff --git a/indra/llcommon/llfoldertype.h b/indra/llcommon/llfoldertype.h index 81f9c0b678..91dc1da543 100644 --- a/indra/llcommon/llfoldertype.h +++ b/indra/llcommon/llfoldertype.h @@ -87,7 +87,7 @@ public: FT_BASIC_ROOT = 52, - FT_MERCHANT_ITEMS = 53, + FT_MARKETPLACE_LISTINGS = 53, FT_COUNT, diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 8f4daa83f9..2ed4605e0c 100755 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -1,8 +1,8 @@ /** * @file llfloateroutbox.cpp - * @brief Implementation of the merchant outbox window and of the merchant items window + * @brief Implementation of the merchant outbox window and of the marketplace listings window * - * *TODO : Eventually, take out all the merchant outbox stuff and rename that file to llfloatermerchantitems + * *TODO : Eventually, take out all the merchant outbox stuff and rename that file to llfloatermarketplacelistings * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code @@ -107,15 +107,15 @@ private: }; ///---------------------------------------------------------------------------- -/// LLMerchantItemsAddedObserver helper class +/// LLMarketplaceListingsAddedObserver helper class ///---------------------------------------------------------------------------- -class LLMerchantItemsAddedObserver : public LLInventoryCategoryAddedObserver +class LLMarketplaceListingsAddedObserver : public LLInventoryCategoryAddedObserver { public: - LLMerchantItemsAddedObserver(LLFloaterMerchantItems * merchant_items_floater) + LLMarketplaceListingsAddedObserver(LLFloaterMarketplaceListings * marketplace_listings_floater) : LLInventoryCategoryAddedObserver() - , mMerchantItemsFloater(merchant_items_floater) + , mMarketplaceListingsFloater(marketplace_listings_floater) { } @@ -127,15 +127,15 @@ public: LLFolderType::EType added_category_type = added_category->getPreferredType(); - if (added_category_type == LLFolderType::FT_MERCHANT_ITEMS) + if (added_category_type == LLFolderType::FT_MARKETPLACE_LISTINGS) { - mMerchantItemsFloater->initializeMarketPlace(); + mMarketplaceListingsFloater->initializeMarketPlace(); } } } private: - LLFloaterMerchantItems * mMerchantItemsFloater; + LLFloaterMarketplaceListings * mMarketplaceListingsFloater; }; @@ -653,10 +653,10 @@ void LLFloaterOutbox::showNotification(const LLNotificationPtr& notification) } ///---------------------------------------------------------------------------- -/// LLFloaterMerchantItems +/// LLFloaterMarketplaceListings ///---------------------------------------------------------------------------- -LLFloaterMerchantItems::LLFloaterMerchantItems(const LLSD& key) +LLFloaterMarketplaceListings::LLFloaterMarketplaceListings(const LLSD& key) : LLFloater(key) , mCategoriesObserver(NULL) , mCategoryAddedObserver(NULL) @@ -668,7 +668,7 @@ LLFloaterMerchantItems::LLFloaterMerchantItems(const LLSD& key) { } -LLFloaterMerchantItems::~LLFloaterMerchantItems() +LLFloaterMarketplaceListings::~LLFloaterMarketplaceListings() { if (mCategoriesObserver && gInventory.containsObserver(mCategoriesObserver)) { @@ -683,18 +683,18 @@ LLFloaterMerchantItems::~LLFloaterMerchantItems() delete mCategoryAddedObserver; } -BOOL LLFloaterMerchantItems::postBuild() +BOOL LLFloaterMarketplaceListings::postBuild() { - mInventoryPlaceholder = getChild("merchant_items_inventory_placeholder_panel"); - mInventoryText = mInventoryPlaceholder->getChild("merchant_items_inventory_placeholder_text"); - mInventoryTitle = mInventoryPlaceholder->getChild("merchant_items_inventory_placeholder_title"); + mInventoryPlaceholder = getChild("marketplace_listings_inventory_placeholder_panel"); + mInventoryText = mInventoryPlaceholder->getChild("marketplace_listings_inventory_placeholder_text"); + mInventoryTitle = mInventoryPlaceholder->getChild("marketplace_listings_inventory_placeholder_title"); - mTopLevelDropZone = getChild("merchant_items_generic_drag_target"); + mTopLevelDropZone = getChild("marketplace_listings_generic_drag_target"); - LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLFloaterMerchantItems::onFocusReceived, this)); + LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLFloaterMarketplaceListings::onFocusReceived, this)); - // Observe category creation to catch merchant items creation (moot if already existing) - mCategoryAddedObserver = new LLMerchantItemsAddedObserver(this); + // Observe category creation to catch marketplace listings creation (moot if already existing) + mCategoryAddedObserver = new LLMarketplaceListingsAddedObserver(this); gInventory.addObserver(mCategoryAddedObserver); // Merov : Debug : fetch aggressively so we can create test data right onOpen() @@ -704,7 +704,7 @@ BOOL LLFloaterMerchantItems::postBuild() return TRUE; } -void LLFloaterMerchantItems::clean() +void LLFloaterMarketplaceListings::clean() { // Note: we cannot delete the mOutboxInventoryPanel as that point // as this is called through callback observers of the panel itself. @@ -714,11 +714,11 @@ void LLFloaterMerchantItems::clean() mRootFolderId.setNull(); } -void LLFloaterMerchantItems::onClose(bool app_quitting) +void LLFloaterMarketplaceListings::onClose(bool app_quitting) { } -void LLFloaterMerchantItems::onOpen(const LLSD& key) +void LLFloaterMarketplaceListings::onOpen(const LLSD& key) { // // Initialize the Market Place or go update the outbox @@ -763,12 +763,12 @@ void LLFloaterMerchantItems::onOpen(const LLSD& key) fetchContents(); } -void LLFloaterMerchantItems::onFocusReceived() +void LLFloaterMarketplaceListings::onFocusReceived() { fetchContents(); } -void LLFloaterMerchantItems::fetchContents() +void LLFloaterMarketplaceListings::fetchContents() { if (mRootFolderId.notNull()) { @@ -776,7 +776,7 @@ void LLFloaterMerchantItems::fetchContents() } } -void LLFloaterMerchantItems::setup() +void LLFloaterMarketplaceListings::setup() { if (LLMarketplaceInventoryImporter::getInstance()->getMarketPlaceStatus() != MarketplaceStatusCodes::MARKET_PLACE_MERCHANT) { @@ -784,24 +784,24 @@ void LLFloaterMerchantItems::setup() return; } - // We are a merchant. Get the Merchant items folder, create it if needs be. - LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MERCHANT_ITEMS, true); + // We are a merchant. Get the Marketplace listings folder, create it if needs be. + LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, true); if (outbox_id.isNull()) { // We should never get there unless the inventory fails badly - llinfos << "Merov : Inventory problem: failure to create the merchant items folder for a merchant!" << llendl; - llerrs << "Inventory problem: failure to create the merchant items folder for a merchant!" << llendl; + llinfos << "Merov : Inventory problem: failure to create the marketplace listings folder for a merchant!" << llendl; + llerrs << "Inventory problem: failure to create the marketplace listings folder for a merchant!" << llendl; return; } - // Consolidate Merchant items + // Consolidate Marketplace listings // We shouldn't have to do that but with a client/server system relying on a "well known folder" convention, things get messy and conventions get broken down eventually - gInventory.consolidateForType(outbox_id, LLFolderType::FT_MERCHANT_ITEMS); + gInventory.consolidateForType(outbox_id, LLFolderType::FT_MARKETPLACE_LISTINGS); if (outbox_id == mRootFolderId) { - llinfos << "Merov : Inventory warning: Merchant items folder already set" << llendl; - llwarns << "Inventory warning: Merchant items folder already set" << llendl; + llinfos << "Merov : Inventory warning: Marketplace listings folder already set" << llendl; + llwarns << "Inventory warning: Marketplace listings folder already set" << llendl; return; } mRootFolderId = outbox_id; @@ -815,7 +815,7 @@ void LLFloaterMerchantItems::setup() } llassert(!mCategoryAddedObserver); - // Create observer for merchant items modifications : clear the old one and create a new one + // Create observer for marketplace listings modifications : clear the old one and create a new one if (mCategoriesObserver && gInventory.containsObserver(mCategoriesObserver)) { gInventory.removeObserver(mCategoriesObserver); @@ -823,16 +823,16 @@ void LLFloaterMerchantItems::setup() } mCategoriesObserver = new LLInventoryCategoriesObserver(); gInventory.addObserver(mCategoriesObserver); - mCategoriesObserver->addCategory(mRootFolderId, boost::bind(&LLFloaterMerchantItems::onChanged, this)); + mCategoriesObserver->addCategory(mRootFolderId, boost::bind(&LLFloaterMarketplaceListings::onChanged, this)); llassert(mCategoriesObserver); - // Set up the merchant items inventory view + // Set up the marketplace listings inventory view LLInventoryPanel* inventory_panel = mInventoryPanel.get(); if (inventory_panel) { delete inventory_panel; } - inventory_panel = LLUICtrlFactory::createFromFile("panel_merchant_items_inventory.xml", mInventoryPlaceholder->getParent(), LLInventoryPanel::child_registry_t::instance()); + inventory_panel = LLUICtrlFactory::createFromFile("panel_marketplace_listings_inventory.xml", mInventoryPlaceholder->getParent(), LLInventoryPanel::child_registry_t::instance()); mInventoryPanel = inventory_panel->getInventoryPanelHandle(); llassert(mInventoryPanel.get() != NULL); @@ -844,11 +844,11 @@ void LLFloaterMerchantItems::setup() inventory_panel->getFolderViewModel()->setSorter(LLInventoryFilter::SO_FOLDERS_BY_NAME); inventory_panel->getFilter().markDefault(); - // Get the content of the merchant items folder + // Get the content of the marketplace listings folder fetchContents(); } -void LLFloaterMerchantItems::initializeMarketPlace() +void LLFloaterMarketplaceListings::initializeMarketPlace() { // // Initialize the marketplace import API @@ -857,14 +857,14 @@ void LLFloaterMerchantItems::initializeMarketPlace() if (!importer.isInitialized()) { - importer.setInitializationErrorCallback(boost::bind(&LLFloaterMerchantItems::initializationReportError, this, _1, _2)); - importer.setStatusChangedCallback(boost::bind(&LLFloaterMerchantItems::importStatusChanged, this, _1)); - importer.setStatusReportCallback(boost::bind(&LLFloaterMerchantItems::importReportResults, this, _1, _2)); + importer.setInitializationErrorCallback(boost::bind(&LLFloaterMarketplaceListings::initializationReportError, this, _1, _2)); + importer.setStatusChangedCallback(boost::bind(&LLFloaterMarketplaceListings::importStatusChanged, this, _1)); + importer.setStatusReportCallback(boost::bind(&LLFloaterMarketplaceListings::importReportResults, this, _1, _2)); importer.initialize(); } } -S32 LLFloaterMerchantItems::getFolderCount() +S32 LLFloaterMarketplaceListings::getFolderCount() { if (mInventoryPanel.get() && mRootFolderId.notNull()) { @@ -880,7 +880,7 @@ S32 LLFloaterMerchantItems::getFolderCount() } } -void LLFloaterMerchantItems::updateView() +void LLFloaterMarketplaceListings::updateView() { LLInventoryPanel* panel = mInventoryPanel.get(); @@ -915,10 +915,10 @@ void LLFloaterMerchantItems::updateView() { setup(); } - // "Merchant items is empty!" message strings - text = LLTrans::getString("InventoryMerchantItemsNoItems", subs); - title = LLTrans::getString("InventoryMerchantItemsNoItemsTitle"); - tooltip = LLTrans::getString("InventoryMerchantItemsNoItemsTooltip"); + // "Marketplace listings is empty!" message strings + text = LLTrans::getString("InventoryMarketplaceListingsNoItems", subs); + title = LLTrans::getString("InventoryMarketplaceListingsNoItemsTitle"); + tooltip = LLTrans::getString("InventoryMarketplaceListingsNoItemsTooltip"); } else if (mkt_status <= MarketplaceStatusCodes::MARKET_PLACE_INITIALIZING) { @@ -948,14 +948,14 @@ void LLFloaterMerchantItems::updateView() } } -bool LLFloaterMerchantItems::isAccepted(EAcceptance accept) +bool LLFloaterMarketplaceListings::isAccepted(EAcceptance accept) { // *TODO : Need a bit more test on what we accept: depends of what and where... return (accept >= ACCEPT_YES_COPY_SINGLE); } -BOOL LLFloaterMerchantItems::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1006,21 +1006,21 @@ BOOL LLFloaterMerchantItems::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL dro return handled; } -BOOL LLFloaterMerchantItems::handleHover(S32 x, S32 y, MASK mask) +BOOL LLFloaterMarketplaceListings::handleHover(S32 x, S32 y, MASK mask) { mTopLevelDropZone->setBackgroundVisible(FALSE); return LLFloater::handleHover(x, y, mask); } -void LLFloaterMerchantItems::onMouseLeave(S32 x, S32 y, MASK mask) +void LLFloaterMarketplaceListings::onMouseLeave(S32 x, S32 y, MASK mask) { mTopLevelDropZone->setBackgroundVisible(FALSE); LLFloater::onMouseLeave(x, y, mask); } -void LLFloaterMerchantItems::onChanged() +void LLFloaterMarketplaceListings::onChanged() { LLViewerInventoryCategory* category = gInventory.getCategory(mRootFolderId); if (mRootFolderId.notNull() && category) @@ -1034,12 +1034,12 @@ void LLFloaterMerchantItems::onChanged() } } -void LLFloaterMerchantItems::initializationReportError(U32 status, const LLSD& content) +void LLFloaterMarketplaceListings::initializationReportError(U32 status, const LLSD& content) { updateView(); } -void LLFloaterMerchantItems::importStatusChanged(bool inProgress) +void LLFloaterMarketplaceListings::importStatusChanged(bool inProgress) { if (mRootFolderId.isNull() && (LLMarketplaceInventoryImporter::getInstance()->getMarketPlaceStatus() == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT)) { @@ -1071,7 +1071,7 @@ void LLFloaterMerchantItems::importStatusChanged(bool inProgress) updateView(); } -void LLFloaterMerchantItems::importReportResults(U32 status, const LLSD& content) +void LLFloaterMarketplaceListings::importReportResults(U32 status, const LLSD& content) { updateView(); } diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 1b1e1e0439..e28fb320ea 100755 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -1,8 +1,8 @@ /** * @file llfloateroutbox.h - * @brief Implementation of the merchant outbox window and of the merchant items window + * @brief Implementation of the merchant outbox window and of the marketplace listings window * - * *TODO : Eventually, take out all the merchant outbox stuff and rename that file to llfloatermerchantitems + * *TODO : Eventually, take out all the merchant outbox stuff and rename that file to llfloatermarketplacelistings * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code @@ -115,14 +115,14 @@ private: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLFloaterMerchantItems +// Class LLFloaterMarketplaceListings //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLFloaterMerchantItems : public LLFloater +class LLFloaterMarketplaceListings : public LLFloater { public: - LLFloaterMerchantItems(const LLSD& key); - ~LLFloaterMerchantItems(); + LLFloaterMarketplaceListings(const LLSD& key); + ~LLFloaterMarketplaceListings(); void initializeMarketPlace(); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index c2f6ce8fb1..9d9279ce90 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -959,9 +959,9 @@ BOOL LLInvFVBridge::isInboxFolder() const return gInventory.isObjectDescendentOf(mUUID, inbox_id); } -BOOL LLInvFVBridge::isMerchantItemsFolder() const +BOOL LLInvFVBridge::isMarketplaceListingsFolder() const { - const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MERCHANT_ITEMS, false); + const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); if (folder_id.isNull()) { @@ -1954,7 +1954,7 @@ std::string LLFolderBridge::getLabelSuffix() const accessories = (parent_folder_id == gInventory.getLibraryRootFolderID()); } */ - if (isMerchantItemsFolder()) + if (isMarketplaceListingsFolder()) { if (LLMarketplaceData::instance().isListed(getUUID())) { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 199a46d275..d9533b537c 100755 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -160,7 +160,7 @@ protected: BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox BOOL isOutboxFolder() const; // true if COF or descendant of marketplace outbox BOOL isOutboxFolderDirectParent() const; - BOOL isMerchantItemsFolder() const; // true if descendant of Merchant items folder + BOOL isMarketplaceListingsFolder() const; // true if descendant of Marketplace listings folder const LLUUID getOutboxFolder() const; virtual BOOL isItemPermissive() const; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index c1607fbbc0..bf8f7819ef 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -288,7 +288,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) { getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_INBOX)); getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_OUTBOX)); - getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_MERCHANT_ITEMS)); + getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_MARKETPLACE_LISTINGS)); } // set the filter for the empty folder if the debug setting is on @@ -1490,6 +1490,6 @@ namespace LLInitParam declare(LLFolderType::lookup(LLFolderType::FT_INBOX) , LLFolderType::FT_INBOX); declare(LLFolderType::lookup(LLFolderType::FT_OUTBOX) , LLFolderType::FT_OUTBOX); declare(LLFolderType::lookup(LLFolderType::FT_BASIC_ROOT) , LLFolderType::FT_BASIC_ROOT); - declare(LLFolderType::lookup(LLFolderType::FT_MERCHANT_ITEMS) , LLFolderType::FT_MERCHANT_ITEMS); + declare(LLFolderType::lookup(LLFolderType::FT_MARKETPLACE_LISTINGS) , LLFolderType::FT_MARKETPLACE_LISTINGS); } } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index f55de790d8..853d98693b 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -243,7 +243,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("tex_fetch_debugger", "floater_texture_fetch_debugger.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); } LLFloaterReg::add("media_settings", "floater_media_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("merchant_items", "floater_merchant_items.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("marketplace_listings", "floater_marketplace_listings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("message_critical", "floater_critical.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("message_tos", "floater_tos.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("moveview", "floater_moveview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index 413814cec0..ee8f85782f 100644 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -141,7 +141,7 @@ LLViewerFolderDictionary::LLViewerFolderDictionary() addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - addEntry(LLFolderType::FT_MERCHANT_ITEMS, new ViewerFolderEntry("Merchant items", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible)); + addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new ViewerFolderEntry("Marketplace listings", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible)); addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false, "default")); diff --git a/indra/newview/skins/default/xui/en/floater_marketplace_listings.xml b/indra/newview/skins/default/xui/en/floater_marketplace_listings.xml new file mode 100755 index 0000000000..94a9466c16 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_marketplace_listings.xml @@ -0,0 +1,121 @@ + + + + + + + Loading... + + + + + + + + Drag items you want to sell + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/floater_merchant_items.xml b/indra/newview/skins/default/xui/en/floater_merchant_items.xml deleted file mode 100755 index 2e54ed2ce3..0000000000 --- a/indra/newview/skins/default/xui/en/floater_merchant_items.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - Loading... - - - - - - - - Drag items you want to sell - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 2dc974eff1..a8e02a9d02 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -182,11 +182,11 @@ parameter="outbox" /> + label="Marketplace listings..." + name="MarketplaceListings"> + parameter="marketplace_listings" /> + + + + diff --git a/indra/newview/skins/default/xui/en/panel_merchant_items_inventory.xml b/indra/newview/skins/default/xui/en/panel_merchant_items_inventory.xml deleted file mode 100755 index a013516267..0000000000 --- a/indra/newview/skins/default/xui/en/panel_merchant_items_inventory.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 515e912ee5..387ad138d9 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2219,9 +2219,9 @@ We are accessing your account on the [[MARKETPLACE_CREATE_STORE_URL] Marketplace The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors. - Your Merchant Items folder is empty. - - + Your Marketplace Listings folder is empty. + + Drag folders to this area to list them for sale on the [[MARKETPLACE_DASHBOARD_URL] Marketplace]. -- cgit v1.3 From 0ec8fbec6deaa24506391ef239c50009eebe1eef Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 28 Mar 2014 15:54:36 -0700 Subject: DD-24 : Add FT_MARKETPLACE_STOCK as a new type for folders, implement the promotion code for Drag and Drop, display of stock folders and embryonic marketplace validation --- indra/llcommon/llfoldertype.cpp | 1 + indra/llcommon/llfoldertype.h | 1 + indra/newview/llinventorybridge.cpp | 56 ++++++++-- indra/newview/llinventoryfunctions.cpp | 149 +++++++++++++++++++++++++ indra/newview/llinventoryfunctions.h | 6 +- indra/newview/llinventorymodel.cpp | 4 +- indra/newview/llinventorypanel.cpp | 1 + indra/newview/llviewerfoldertype.cpp | 3 +- indra/newview/skins/default/xui/en/strings.xml | 1 + 9 files changed, 210 insertions(+), 12 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llfoldertype.cpp b/indra/llcommon/llfoldertype.cpp index 5b80189d2a..afa9e59832 100755 --- a/indra/llcommon/llfoldertype.cpp +++ b/indra/llcommon/llfoldertype.cpp @@ -98,6 +98,7 @@ LLFolderDictionary::LLFolderDictionary() addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE)); addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new FolderEntry("merchant", FALSE)); + addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new FolderEntry("stock", FALSE)); addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE)); }; diff --git a/indra/llcommon/llfoldertype.h b/indra/llcommon/llfoldertype.h index 91dc1da543..20925eede0 100644 --- a/indra/llcommon/llfoldertype.h +++ b/indra/llcommon/llfoldertype.h @@ -88,6 +88,7 @@ public: FT_BASIC_ROOT = 52, FT_MARKETPLACE_LISTINGS = 53, + FT_MARKETPLACE_STOCK = 54, FT_COUNT, diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3d418105e3..d0abe6db29 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1958,7 +1958,7 @@ std::string LLFolderBridge::getLabelSuffix() const { if (LLMarketplaceData::instance().isListed(getUUID())) { - llinfos << "Merov : in merchant folder and listed : id = " << getUUID() << llendl; + //llinfos << "Merov : in merchant folder and listed : id = " << getUUID() << llendl; std::string suffix = LLMarketplaceData::instance().getListingID(getUUID()); if (suffix.empty()) { @@ -1971,9 +1971,15 @@ std::string LLFolderBridge::getLabelSuffix() const } return LLInvFVBridge::getLabelSuffix() + suffix; } + else if (getCategory()->getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK) + { + //llinfos << "Merov : in merchant folder and is a stock folder : id = " << getUUID() << llendl; + std::string suffix = " (" + LLTrans::getString("MarketplaceStock") + ")"; + return LLInvFVBridge::getLabelSuffix() + suffix; + } else { - llinfos << "Merov : in merchant folder but not listed : id = " << getUUID() << llendl; + //llinfos << "Merov : in merchant folder but not listed : id = " << getUUID() << llendl; return LLInvFVBridge::getLabelSuffix(); } } @@ -2316,10 +2322,13 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLUUID &cat_id = inv_cat->getUUID(); const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); const BOOL move_is_from_outbox = model->isObjectDescendentOf(cat_id, outbox_id); + const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id); // check to make sure source is agent inventory, and is represented there. LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); @@ -2499,6 +2508,12 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } } + if (is_movable && move_is_into_marketplacelistings) + { + // *TODO : Merov : Add here the logic to prevent huge nesting in marketplace listings + // For the moment, we just take in anything + is_movable = TRUE; + } if (is_movable) { @@ -2601,6 +2616,10 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, { copy_folder_to_outbox(inv_cat, mUUID, cat_id, LLToolDragAndDrop::getOperationId()); } + else if (move_is_into_marketplacelistings && !move_is_from_marketplacelistings) + { + move_folder_to_marketplacelistings(inv_cat, mUUID); + } else { if (model->isObjectDescendentOf(cat_id, model->findCategoryUUIDForType(LLFolderType::FT_INBOX, false))) @@ -2620,7 +2639,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else if (LLToolDragAndDrop::SOURCE_WORLD == source) { - if (move_is_into_outbox) + if (move_is_into_outbox || move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; @@ -2632,7 +2651,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else if (LLToolDragAndDrop::SOURCE_LIBRARY == source) { - if (move_is_into_outbox) + if (move_is_into_outbox || move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; @@ -3248,6 +3267,9 @@ void LLFolderBridge::pasteFromClipboard() const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); + // *TODO : Add marketplace listings case + //const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); + //const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); LLDynamicArray objects; LLClipboard::instance().pasteFromClipboard(objects); @@ -3372,12 +3394,14 @@ void LLFolderBridge::pasteLinkFromClipboard() { const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); + const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - if (move_is_into_outbox) + if (move_is_into_outbox || move_is_into_marketplacelistings) { // Notify user of failure somehow -- play error sound? modal dialog? return; @@ -4047,6 +4071,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE, false); const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false); const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); const BOOL move_is_into_favorites = (mUUID == favorites_id); @@ -4054,6 +4079,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); const BOOL move_is_from_outbox = model->isObjectDescendentOf(inv_item->getUUID(), outbox_id); + const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); BOOL accept = FALSE; @@ -4150,6 +4176,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } } } + else if (move_is_into_marketplacelistings) + { + // *TODO : Add here any logic that may prevent an item to be copied into the marketplace listings + // For the moment, we let anything go + accept = TRUE; + } LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); @@ -4208,6 +4240,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { dropToOutfit(inv_item, move_is_into_current_outfit); } + // MERCHANT OUTBOX folder + // Move the item else if (move_is_into_outbox) { if (move_is_from_outbox) @@ -4219,6 +4253,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, copy_item_to_outbox(inv_item, mUUID, LLUUID::null, LLToolDragAndDrop::getOperationId()); } } + // MARKETPLACE LISTINGS folder + // Move the item + else if (move_is_into_marketplacelistings) + { + move_item_to_marketplacelistings(inv_item, mUUID); + } // NORMAL or TRASH folder // (move the item, restamp if into trash) else @@ -4285,7 +4325,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { accept = FALSE; } - else if (move_is_into_outbox) + else if (move_is_into_outbox || move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; @@ -4323,7 +4363,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } else if(LLToolDragAndDrop::SOURCE_NOTECARD == source) { - if (move_is_into_outbox) + if (move_is_into_outbox || move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; @@ -4357,7 +4397,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { accept = TRUE; - if (move_is_into_outbox) + if (move_is_into_outbox || move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 203eb4ec4e..fe55f8955f 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -686,6 +686,155 @@ void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_fold open_outbox(); } +void move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_folder) +{ + // Collapse links into items/folders + LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item; + LLViewerInventoryCategory * linked_category = viewer_inv_item->getLinkedCategory(); + + if (linked_category != NULL) + { + // Move the linked folder directly + move_folder_to_marketplacelistings(linked_category, dest_folder); + } + else + { + // Grab the linked item if any + LLViewerInventoryItem * linked_item = viewer_inv_item->getLinkedItem(); + viewer_inv_item = (linked_item != NULL ? linked_item : viewer_inv_item); + + // Check that the agent has copy permission on the item: this is required as a resident cannot + // put on sale items she has no right about. Proceed with move if we have permission. + // *TODO : Check that this is adequate (copied from the Merchant Outbox permission check so should be OK...) + if (viewer_inv_item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + { + // When moving an isolated item directly under the marketplace listings root, we create a new folder with that name + if (dest_folder == gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false)) + { + // *TODO : This method is not specific to the outbox folder so make it more generic + dest_folder = create_folder_in_outbox_for_item(inv_item, dest_folder, 0); + } + + // Reparent the item + gInventory.changeItemParent(viewer_inv_item, dest_folder, false); + + // Check the item for no copy permission and promote the destination folder if necessary + if (!(viewer_inv_item->getPermissions().getMaskEveryone() & PERM_COPY)) + { + llinfos << "Merov : item is no copy -> change the destination folder type!" << llendl; + LLViewerInventoryCategory * viewer_cat = (LLViewerInventoryCategory *) (gInventory.getCategory(dest_folder)); + viewer_cat->changeType(LLFolderType::FT_MARKETPLACE_STOCK); + } + } + else + { + // *TODO : signal an error to the user (UI for this TBD) + llinfos << "Merov : user doesn't have the correct permission to put this item on sale -> move aborted!" << llendl; + } + } +} + +void move_folder_to_marketplacelistings(LLInventoryCategory* inv_cat, const LLUUID& dest_folder) +{ + // Check that we have adequate permission on all items being moved. Proceed if we do. + if (has_correct_permissions_for_sale(inv_cat)) + { + + // Reparent the folder + LLViewerInventoryCategory * viewer_inv_cat = (LLViewerInventoryCategory *) inv_cat; + gInventory.changeCategoryParent(viewer_inv_cat, dest_folder, false); + + // Check the destination folder recursively for no copy items and promote the including folders if any + validate_marketplacelistings(inv_cat); + } +} + +// Returns true if all items within the argument folder are fit for sale, false otherwise +bool has_correct_permissions_for_sale(LLInventoryCategory* cat) +{ + LLInventoryModel::cat_array_t* cat_array; + LLInventoryModel::item_array_t* item_array; + gInventory.getDirectDescendentsOf(cat->getUUID(),cat_array,item_array); + + LLInventoryModel::item_array_t item_array_copy = *item_array; + + for (LLInventoryModel::item_array_t::iterator iter = item_array_copy.begin(); iter != item_array_copy.end(); iter++) + { + LLInventoryItem* item = *iter; + LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) item; + LLViewerInventoryCategory * linked_category = viewer_inv_item->getLinkedCategory(); + LLViewerInventoryItem * linked_item = viewer_inv_item->getLinkedItem(); + // Linked items and folders cannot be put for sale + if (linked_category || linked_item) + { + llinfos << "Merov : linked items in this folder -> not allowed to sell!" << llendl; + return false; + } + // *TODO : Check that this is adequate (copied from the Merchant Outbox permission check so should be OK...) + if (!viewer_inv_item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + { + llinfos << "Merov : wrong permissions on items in this folder -> not allowed to sell!" << llendl; + return false; + } + } + + LLInventoryModel::cat_array_t cat_array_copy = *cat_array; + + for (LLInventoryModel::cat_array_t::iterator iter = cat_array_copy.begin(); iter != cat_array_copy.end(); iter++) + { + LLInventoryCategory* category = *iter; + if (!has_correct_permissions_for_sale(category)) + { + return false; + } + } + return true; +} + +// Make all relevant business logic checks on the marketplace listings starting with the folder as argument +// This function does no deletion or move but a mere audit and raises issues to the user +// The only thing that's done is to modify the type of folders containing no-copy items to stock folders +// *TODO : Signal the errors to the user somewhat (UI still TBD) +// *TODO : Add the rest of the SLM/AIS business logic (limit of nesting depth, stock folder consistency, overall limit on listings, etc...) +void validate_marketplacelistings(LLInventoryCategory* cat) +{ + LLInventoryModel::cat_array_t* cat_array; + LLInventoryModel::item_array_t* item_array; + gInventory.getDirectDescendentsOf(cat->getUUID(),cat_array,item_array); + + LLInventoryModel::item_array_t item_array_copy = *item_array; + + for (LLInventoryModel::item_array_t::iterator iter = item_array_copy.begin(); iter != item_array_copy.end(); iter++) + { + LLInventoryItem* item = *iter; + LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) item; + LLViewerInventoryCategory * linked_category = viewer_inv_item->getLinkedCategory(); + LLViewerInventoryItem * linked_item = viewer_inv_item->getLinkedItem(); + if (linked_category || linked_item) + { + llinfos << "Merov : Validation error: there are linked items in this listing!" << llendl; + } + if (!viewer_inv_item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + { + llinfos << "Merov : Validation error: there are items with incorrect permissions in this listing!" << llendl; + } + if (!(viewer_inv_item->getPermissions().getMaskEveryone() & PERM_COPY)) + { + llinfos << "Merov : Validation warning : item is no copy -> change the folder type to stock!" << llendl; + LLViewerInventoryCategory * viewer_cat = (LLViewerInventoryCategory *) (cat); + viewer_cat->changeType(LLFolderType::FT_MARKETPLACE_STOCK); + } + } + + LLInventoryModel::cat_array_t cat_array_copy = *cat_array; + + for (LLInventoryModel::cat_array_t::iterator iter = cat_array_copy.begin(); iter != cat_array_copy.end(); iter++) + { + LLInventoryCategory* category = *iter; + validate_marketplacelistings(category); + } +} + ///---------------------------------------------------------------------------- /// LLInventoryCollectFunctor implementations ///---------------------------------------------------------------------------- diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 1443c186cf..006cc3de68 100755 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -70,9 +70,13 @@ void append_path(const LLUUID& id, std::string& path); void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder, S32 operation_id); void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, S32 operation_id); - void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder, S32 operation_id); +void move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_folder); +void move_folder_to_marketplacelistings(LLInventoryCategory* inv_cat, const LLUUID& dest_folder); +bool has_correct_permissions_for_sale(LLInventoryCategory* cat); +void validate_marketplacelistings(LLInventoryCategory* inv_cat); + /** Miscellaneous global functions ** ** *******************************************************************************/ diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index ed7fd3cd34..37e11123c6 100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2160,12 +2160,12 @@ void LLInventoryModel::buildParentChildMap() // implement it, we would need a set or map of uuid pairs // which would be (folder_id, new_parent_id) to be sent up // to the server. - llinfos << "Lost categroy: " << cat->getUUID() << " - " + llinfos << "Lost category: " << cat->getUUID() << " - " << cat->getName() << llendl; ++lost; // plop it into the lost & found. LLFolderType::EType pref = cat->getPreferredType(); - if(LLFolderType::FT_NONE == pref) + if ((LLFolderType::FT_NONE == pref) || (LLFolderType::FT_MARKETPLACE_STOCK == pref)) { cat->setParent(findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND)); } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index bf8f7819ef..6305275a08 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1491,5 +1491,6 @@ namespace LLInitParam declare(LLFolderType::lookup(LLFolderType::FT_OUTBOX) , LLFolderType::FT_OUTBOX); declare(LLFolderType::lookup(LLFolderType::FT_BASIC_ROOT) , LLFolderType::FT_BASIC_ROOT); declare(LLFolderType::lookup(LLFolderType::FT_MARKETPLACE_LISTINGS) , LLFolderType::FT_MARKETPLACE_LISTINGS); + declare(LLFolderType::lookup(LLFolderType::FT_MARKETPLACE_STOCK), LLFolderType::FT_MARKETPLACE_STOCK); } } diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index ee8f85782f..b82f954e91 100644 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -142,7 +142,8 @@ LLViewerFolderDictionary::LLViewerFolderDictionary() addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new ViewerFolderEntry("Marketplace listings", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible)); - + addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new ViewerFolderEntry("New Stock", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false, "default")); + addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false, "default")); #if SUPPORT_ENSEMBLES diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 80b520622a..ce9bbbc8d2 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2273,6 +2273,7 @@ The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors. no Mkt ID live + stock Open landmarks -- cgit v1.3 From 250f05861eeec06b864e57c1fda6a996b6a94029 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 21 Apr 2014 11:27:52 -0700 Subject: DD-66 : Use new icons for version folders and stock folder --- indra/llcommon/llfoldertype.cpp | 1 + indra/llcommon/llfoldertype.h | 1 + indra/newview/llinventorybridge.cpp | 15 +++++++++++++-- indra/newview/llinventorypanel.cpp | 1 + indra/newview/llviewerfoldertype.cpp | 3 ++- .../default/textures/icons/Inv_StockFolderClosed.png | Bin 1063 -> 1143 bytes .../default/textures/icons/Inv_StockFolderOpen.png | Bin 361 -> 1319 bytes .../textures/icons/Inv_VersionFolderClosed.png | Bin 0 -> 1132 bytes .../default/textures/icons/Inv_VersionFolderOpen.png | Bin 0 -> 1521 bytes indra/newview/skins/default/textures/textures.xml | 2 ++ 10 files changed, 20 insertions(+), 3 deletions(-) mode change 100755 => 100644 indra/newview/skins/default/textures/icons/Inv_StockFolderOpen.png create mode 100644 indra/newview/skins/default/textures/icons/Inv_VersionFolderClosed.png create mode 100644 indra/newview/skins/default/textures/icons/Inv_VersionFolderOpen.png (limited to 'indra/llcommon') diff --git a/indra/llcommon/llfoldertype.cpp b/indra/llcommon/llfoldertype.cpp index afa9e59832..965e4d9734 100755 --- a/indra/llcommon/llfoldertype.cpp +++ b/indra/llcommon/llfoldertype.cpp @@ -99,6 +99,7 @@ LLFolderDictionary::LLFolderDictionary() addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new FolderEntry("merchant", FALSE)); addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new FolderEntry("stock", FALSE)); + addEntry(LLFolderType::FT_MARKETPLACE_VERSION, new FolderEntry("version", FALSE)); addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE)); }; diff --git a/indra/llcommon/llfoldertype.h b/indra/llcommon/llfoldertype.h index 20925eede0..515bb05a3f 100644 --- a/indra/llcommon/llfoldertype.h +++ b/indra/llcommon/llfoldertype.h @@ -89,6 +89,7 @@ public: FT_MARKETPLACE_LISTINGS = 53, FT_MARKETPLACE_STOCK = 54, + FT_MARKETPLACE_VERSION = 55, // Note: We actually *never* create folders with that type. This is used for icon override only. FT_COUNT, diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1eb647b1b2..3f2a5501bd 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3317,10 +3317,15 @@ LLUIImagePtr LLFolderBridge::getIcon() const { LLFolderType::EType preferred_type = LLFolderType::FT_NONE; LLViewerInventoryCategory* cat = getCategory(); - if(cat) + if (cat) { preferred_type = cat->getPreferredType(); } + if ((preferred_type == LLFolderType::FT_NONE) && (depth_nesting_in_marketplace(mUUID) == 2)) + { + // We override the type when in the marketplace listings folder and only for version folder + preferred_type = LLFolderType::FT_MARKETPLACE_VERSION; + } return getIcon(preferred_type); } @@ -3332,7 +3337,13 @@ LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type) LLUIImagePtr LLFolderBridge::getIconOpen() const { - return LLUI::getUIImage(LLViewerFolderType::lookupIconName(getPreferredType(), TRUE)); + LLFolderType::EType preferred_type = getPreferredType(); + if ((preferred_type == LLFolderType::FT_NONE) && (depth_nesting_in_marketplace(mUUID) == 2)) + { + // We override the type when in the marketplace listings folder and only for version folder + preferred_type = LLFolderType::FT_MARKETPLACE_VERSION; + } + return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, TRUE)); } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 7d774110bd..b0163b5996 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1493,5 +1493,6 @@ namespace LLInitParam declare(LLFolderType::lookup(LLFolderType::FT_BASIC_ROOT) , LLFolderType::FT_BASIC_ROOT); declare(LLFolderType::lookup(LLFolderType::FT_MARKETPLACE_LISTINGS) , LLFolderType::FT_MARKETPLACE_LISTINGS); declare(LLFolderType::lookup(LLFolderType::FT_MARKETPLACE_STOCK), LLFolderType::FT_MARKETPLACE_STOCK); + declare(LLFolderType::lookup(LLFolderType::FT_MARKETPLACE_VERSION), LLFolderType::FT_MARKETPLACE_VERSION); } } diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index 7fb6331061..1e9d0791c0 100644 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -142,7 +142,8 @@ LLViewerFolderDictionary::LLViewerFolderDictionary() addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new ViewerFolderEntry("Marketplace listings", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible)); - addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new ViewerFolderEntry("New Stock", "Inv_StockFolderOpen", "Inv_StockFolderClosed", FALSE, false, "default")); + addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new ViewerFolderEntry("New Stock", "Inv_StockFolderOpen", "Inv_StockFolderClosed", FALSE, false, "default")); + addEntry(LLFolderType::FT_MARKETPLACE_VERSION, new ViewerFolderEntry("New Version", "Inv_VersionFolderOpen","Inv_VersionFolderClosed", FALSE, false, "default")); addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false, "default")); diff --git a/indra/newview/skins/default/textures/icons/Inv_StockFolderClosed.png b/indra/newview/skins/default/textures/icons/Inv_StockFolderClosed.png index 4ad25840da..4dc484dc22 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_StockFolderClosed.png and b/indra/newview/skins/default/textures/icons/Inv_StockFolderClosed.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_StockFolderOpen.png b/indra/newview/skins/default/textures/icons/Inv_StockFolderOpen.png old mode 100755 new mode 100644 index 0507c2cbaf..0d140b56a7 Binary files a/indra/newview/skins/default/textures/icons/Inv_StockFolderOpen.png and b/indra/newview/skins/default/textures/icons/Inv_StockFolderOpen.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_VersionFolderClosed.png b/indra/newview/skins/default/textures/icons/Inv_VersionFolderClosed.png new file mode 100644 index 0000000000..e89a4d7f31 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Inv_VersionFolderClosed.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_VersionFolderOpen.png b/indra/newview/skins/default/textures/icons/Inv_VersionFolderOpen.png new file mode 100644 index 0000000000..659d7d392f Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Inv_VersionFolderOpen.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index c172afd419..9c81271308 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -313,6 +313,8 @@ with the same filename but different name + + -- cgit v1.3 From 618e13a2d6c5bd632892865fc3b88051c13a7658 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 2 Jan 2015 17:35:50 -0800 Subject: DD-297 : Performance on login : Refactored the code so that we have a new LLMarketplaceFolderBridge class in the bridge model. Only the panels with the use_marketplace_folders param flag will use that one. --- indra/llcommon/llassettype.h | 3 + indra/newview/llinventorybridge.cpp | 170 ++++++++++++--------- indra/newview/llinventorybridge.h | 25 ++- indra/newview/llinventorypanel.cpp | 8 +- indra/newview/llinventorypanel.h | 2 + .../en/panel_marketplace_listings_inventory.xml | 1 + .../xui/en/panel_marketplace_listings_listed.xml | 1 + .../en/panel_marketplace_listings_unassociated.xml | 1 + .../xui/en/panel_marketplace_listings_unlisted.xml | 1 + 9 files changed, 139 insertions(+), 73 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h index 5a95a58d93..3a4b5dad18 100755 --- a/indra/llcommon/llassettype.h +++ b/indra/llcommon/llassettype.h @@ -107,6 +107,9 @@ public: AT_LINK_FOLDER = 25, // Inventory folder link + AT_MARKETPLACE_FOLDER = 26, + // Marketplace folder. Same as an AT_CATEGORY but different display methods. + AT_WIDGET = 40, // UI Widget: this is *not* an inventory asset type, only a viewer side asset (e.g. button, other ui items...) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 4e3895ea9d..2dafbccd96 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1274,11 +1274,18 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_CATEGORY: if (actual_asset_type == LLAssetType::AT_LINK_FOLDER) { - // Create a link folder handler instead. + // Create a link folder handler instead new_listener = new LLLinkFolderBridge(inventory, root, uuid); - break; } - new_listener = new LLFolderBridge(inventory, root, uuid); + else if (actual_asset_type == LLAssetType::AT_MARKETPLACE_FOLDER) + { + // Create a marketplace folder handler + new_listener = new LLMarketplaceFolderBridge(inventory, root, uuid); + } + else + { + new_listener = new LLFolderBridge(inventory, root, uuid); + } break; case LLAssetType::AT_LINK: case LLAssetType::AT_LINK_FOLDER: @@ -2090,71 +2097,14 @@ std::string LLFolderBridge::getLabelSuffix() const return llformat(" ( %s ) ", LLTrans::getString("LoadingData").c_str()); } - if (isMarketplaceListingsFolder()) - { - std::string suffix = ""; - // Listing folder case - if (LLMarketplaceData::instance().isListed(getUUID())) - { - suffix = llformat("%d",LLMarketplaceData::instance().getListingID(getUUID())); - if (suffix.empty()) - { - suffix = LLTrans::getString("MarketplaceNoID"); - } - suffix = " (" + suffix + ")"; - if (LLMarketplaceData::instance().getActivationState(getUUID())) - { - suffix += " (" + LLTrans::getString("MarketplaceLive") + ")"; - } - } - // Version folder case - else if (LLMarketplaceData::instance().isVersionFolder(getUUID())) - { - suffix += " (" + LLTrans::getString("MarketplaceActive") + ")"; - } - // Add stock amount - S32 stock_count = compute_stock_count(getUUID()); - if (stock_count == 0) - { - suffix += " (" + LLTrans::getString("MarketplaceNoStock") + ")"; - } - else if (stock_count != -1) - { - if (getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK) - { - suffix += " (" + LLTrans::getString("MarketplaceStock") + "=" + llformat("%d", stock_count) + ")"; - } - else - { - suffix += " (" + LLTrans::getString("MarketplaceMax") + "=" + llformat("%d", stock_count) + ")"; - } - } - // Add updating suffix - if (LLMarketplaceData::instance().isUpdating(getUUID())) - { - suffix += " (" + LLTrans::getString("MarketplaceUpdating") + ")"; - } - return LLInvFVBridge::getLabelSuffix() + suffix; - } - else - { - return LLInvFVBridge::getLabelSuffix(); - } + return LLInvFVBridge::getLabelSuffix(); } LLFontGL::StyleFlags LLFolderBridge::getLabelStyle() const { - if (isMarketplaceListingsFolder() && LLMarketplaceData::instance().getActivationState(getUUID())) - { - return LLFontGL::BOLD; - } - else - { - return LLFontGL::NORMAL; - } + return LLFontGL::NORMAL; } - void LLFolderBridge::update() { // we know we have children but haven't fetched them (doesn't obey filter) @@ -3283,12 +3233,6 @@ LLUIImagePtr LLFolderBridge::getIconOpen() const LLUIImagePtr LLFolderBridge::getFolderIcon(BOOL is_open) const { LLFolderType::EType preferred_type = getPreferredType(); - S32 depth = depth_nesting_in_marketplace(mUUID); - if ((preferred_type == LLFolderType::FT_NONE) && (depth == 2)) - { - // We override the type when in the marketplace listings folder and only for version folder - preferred_type = LLFolderType::FT_MARKETPLACE_VERSION; - } return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, is_open)); } @@ -4184,6 +4128,96 @@ void LLFolderBridge::modifyOutfit(BOOL append) LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append ); } +// +=================================================+ +// | LLMarketplaceFolderBridge | +// +=================================================+ + +// LLMarketplaceFolderBridge is a specialized LLFolderBridge for use in Marketplace Inventory panels + +LLUIImagePtr LLMarketplaceFolderBridge::getIcon() const +{ + return getMarketplaceFolderIcon(FALSE); +} + +LLUIImagePtr LLMarketplaceFolderBridge::getIconOpen() const +{ + return getMarketplaceFolderIcon(TRUE); +} + +LLUIImagePtr LLMarketplaceFolderBridge::getMarketplaceFolderIcon(BOOL is_open) const +{ + LLFolderType::EType preferred_type = getPreferredType(); + S32 depth = depth_nesting_in_marketplace(mUUID); + if ((preferred_type == LLFolderType::FT_NONE) && (depth == 2)) + { + // We override the type when in the marketplace listings folder and only for version folder + preferred_type = LLFolderType::FT_MARKETPLACE_VERSION; + } + return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, is_open)); +} + +std::string LLMarketplaceFolderBridge::getLabelSuffix() const +{ + static LLCachedControl folder_loading_message_delay(gSavedSettings, "FolderLoadingMessageWaitTime", 0.5f); + + if (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= folder_loading_message_delay()) + { + return llformat(" ( %s ) ", LLTrans::getString("LoadingData").c_str()); + } + + std::string suffix = ""; + // Listing folder case + if (LLMarketplaceData::instance().isListed(getUUID())) + { + suffix = llformat("%d",LLMarketplaceData::instance().getListingID(getUUID())); + if (suffix.empty()) + { + suffix = LLTrans::getString("MarketplaceNoID"); + } + suffix = " (" + suffix + ")"; + if (LLMarketplaceData::instance().getActivationState(getUUID())) + { + suffix += " (" + LLTrans::getString("MarketplaceLive") + ")"; + } + } + // Version folder case + else if (LLMarketplaceData::instance().isVersionFolder(getUUID())) + { + suffix += " (" + LLTrans::getString("MarketplaceActive") + ")"; + } + // Add stock amount + S32 stock_count = compute_stock_count(getUUID()); + if (stock_count == 0) + { + suffix += " (" + LLTrans::getString("MarketplaceNoStock") + ")"; + } + else if (stock_count != -1) + { + if (getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK) + { + suffix += " (" + LLTrans::getString("MarketplaceStock") + "=" + llformat("%d", stock_count) + ")"; + } + else + { + suffix += " (" + LLTrans::getString("MarketplaceMax") + "=" + llformat("%d", stock_count) + ")"; + } + } + // Add updating suffix + if (LLMarketplaceData::instance().isUpdating(getUUID())) + { + suffix += " (" + LLTrans::getString("MarketplaceUpdating") + ")"; + } + return LLInvFVBridge::getLabelSuffix() + suffix; +} + +LLFontGL::StyleFlags LLMarketplaceFolderBridge::getLabelStyle() const +{ + return (LLMarketplaceData::instance().getActivationState(getUUID()) ? LLFontGL::BOLD : LLFontGL::NORMAL); +} + + + + // helper stuff bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv* move_inv) { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 2757f5c884..641d30040b 100755 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -362,7 +362,7 @@ public: static LLHandle sSelf; static void staticFolderOptionsMenu(); -private: +protected: void callback_pasteFromClipboard(const LLSD& notification, const LLSD& response); void perform_pasteFromClipboard(); void gatherMessage(std::string& message, LLError::ELevel log_level); @@ -683,6 +683,29 @@ public: U32 flags = 0x00) const; }; +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Marketplace Inventory Panel related classes +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLMarketplaceFolderBridge : public LLFolderBridge +{ +public: + // Overloads some display related methods specific to folders in a marketplace floater context + LLMarketplaceFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLFolderBridge(inventory, root, uuid) { } + + virtual LLUIImagePtr getIcon() const; + virtual LLUIImagePtr getIconOpen() const; + virtual std::string getLabelSuffix() const; + virtual LLFontGL::StyleFlags getLabelStyle() const; + +private: + LLUIImagePtr getMarketplaceFolderIcon(BOOL is_open) const; +}; + + void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment, bool replace = false); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 86ff1aed1b..a2e5e1e5d8 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -839,16 +839,16 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) if ((objectp->getType() == LLAssetType::AT_CATEGORY) && (objectp->getActualType() != LLAssetType::AT_LINK_FOLDER)) { - LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(objectp->getType(), - objectp->getType(), + LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY, + (mParams.use_marketplace_folders ? LLAssetType::AT_MARKETPLACE_FOLDER : LLAssetType::AT_CATEGORY), LLInventoryType::IT_CATEGORY, this, - &mInventoryViewModel, + &mInventoryViewModel, mFolderRoot.get(), objectp->getUUID()); if (new_listener) { - folder_view_item = createFolderViewFolder(new_listener,allow_drop); + folder_view_item = createFolderViewFolder(new_listener,allow_drop); } } else diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 822c7c2fe7..5edb244af6 100755 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -98,6 +98,7 @@ public: Optional show_empty_message; Optional show_root_folder; Optional allow_drop_on_root; + Optional use_marketplace_folders; Optional scroll; Optional accepts_drag_and_drop; Optional folder_view; @@ -115,6 +116,7 @@ public: show_empty_message("show_empty_message", true), show_root_folder("show_root_folder", false), allow_drop_on_root("allow_drop_on_root", true), + use_marketplace_folders("use_marketplace_folders", false), scroll("scroll"), accepts_drag_and_drop("accepts_drag_and_drop"), folder_view("folder_view"), diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml index 67988f3153..567e5e2724 100755 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml @@ -12,6 +12,7 @@ start_folder.name="Marketplace listings" show_empty_message="true" show_root_folder="true" + use_marketplace_folders="true" start_folder.type="merchant" tool_tip="Drag and drop items here to list them" bg_opaque_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml index 181eee70e2..668be27bdc 100755 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml @@ -11,6 +11,7 @@ start_folder.name="Marketplace listings" show_empty_message="true" show_root_folder="true" + use_marketplace_folders="true" allow_drop_on_root="false" start_folder.type="merchant" bg_opaque_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml index 6ea4784c4c..0015c85aa2 100755 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml @@ -11,6 +11,7 @@ start_folder.name="Marketplace listings" show_empty_message="true" show_root_folder="true" + use_marketplace_folders="true" start_folder.type="merchant" bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml index 0d19d09918..ec9c176811 100755 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml @@ -11,6 +11,7 @@ start_folder.name="Marketplace listings" show_empty_message="true" show_root_folder="true" + use_marketplace_folders="true" allow_drop_on_root="false" start_folder.type="merchant" bg_opaque_color="DkGray2" -- cgit v1.3