From c9ba8f1fce4665f19ec9485c5ceb5bfa7f290321 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 3 Feb 2023 23:56:35 +0200 Subject: SL-19109 Decouple object profiles from inventory Potentially this won't stay as sidepanels, but such rework is planned for SL-19134, for now just making it possible to open multiple instances of item profiles --- indra/newview/llfloatermarketplacelistings.cpp | 30 ++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index e755e9924c..478b6a9a50 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -41,6 +41,7 @@ #include "llnotificationmanager.h" #include "llnotificationsutil.h" #include "llsidepaneliteminfo.h" +#include "llsidepaneltaskinfo.h" #include "lltextbox.h" #include "lltrans.h" @@ -955,17 +956,34 @@ LLFloaterItemProperties::~LLFloaterItemProperties() BOOL LLFloaterItemProperties::postBuild() { // On the standalone properties floater, we have no need for a back button... - LLSidepanelItemInfo* panel = getChild("item_panel"); - LLButton* back_btn = panel->getChild("back_btn"); - back_btn->setVisible(FALSE); - + LLSidepanelInventorySubpanel* panel = findChild("sidepanel"); + if (panel) + { + LLButton* back_btn = panel->getChild("back_btn"); + back_btn->setVisible(FALSE); + } return LLFloater::postBuild(); } void LLFloaterItemProperties::onOpen(const LLSD& key) { // Tell the panel which item it needs to visualize - LLSidepanelItemInfo* panel = getChild("item_panel"); - panel->setItemID(key["id"].asUUID()); + LLSidepanelInventorySubpanel* panel = findChild("sidepanel"); + + LLSidepanelItemInfo* item_panel = dynamic_cast(panel); + if (item_panel) + { + item_panel->setItemID(key["id"].asUUID()); + if (key.has("object")) + { + item_panel->setObjectID(key["object"].asUUID()); + } + } + + LLSidepanelTaskInfo* task_panel = dynamic_cast(panel); + if (task_panel) + { + task_panel->setObjectSelection(LLSelectMgr::getInstance()->getSelection()); + } } -- cgit v1.2.3 From 13a65319e0648cf228a82950e96a84d3a69bf6e3 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 4 Feb 2023 19:23:45 +0200 Subject: SL-19109 Turn LLSidepanelItemInfo into a normal panel --- indra/newview/llfloatermarketplacelistings.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 478b6a9a50..4c8e365dd0 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -955,20 +955,13 @@ LLFloaterItemProperties::~LLFloaterItemProperties() BOOL LLFloaterItemProperties::postBuild() { - // On the standalone properties floater, we have no need for a back button... - LLSidepanelInventorySubpanel* panel = findChild("sidepanel"); - if (panel) - { - LLButton* back_btn = panel->getChild("back_btn"); - back_btn->setVisible(FALSE); - } return LLFloater::postBuild(); } void LLFloaterItemProperties::onOpen(const LLSD& key) { // Tell the panel which item it needs to visualize - LLSidepanelInventorySubpanel* panel = findChild("sidepanel"); + LLPanel* panel = findChild("sidepanel"); LLSidepanelItemInfo* item_panel = dynamic_cast(panel); if (item_panel) @@ -978,6 +971,7 @@ void LLFloaterItemProperties::onOpen(const LLSD& key) { item_panel->setObjectID(key["object"].asUUID()); } + item_panel->setParentFloater(this); } LLSidepanelTaskInfo* task_panel = dynamic_cast(panel); -- cgit v1.2.3 From 1cc41cb9c4c4dfaa7e385e63dac25ff97c18e63a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 8 Feb 2023 14:02:09 +0200 Subject: SL-19134 Remove llfloaterproperties Looks like it wasn't used for a while and LLFloaterItemPropertie does the same thing now --- indra/newview/llfloatermarketplacelistings.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 4c8e365dd0..56cdd3446f 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -42,6 +42,7 @@ #include "llnotificationsutil.h" #include "llsidepaneliteminfo.h" #include "llsidepaneltaskinfo.h" +#include "lltabcontainer.h" #include "lltextbox.h" #include "lltrans.h" -- cgit v1.2.3 From c5a3c97b6b3a65a4f0c34e74db925f8ed71c8109 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 14 Feb 2023 00:40:01 +0100 Subject: Add multi item properties floater support --- indra/newview/llfloatermarketplacelistings.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 56cdd3446f..58bd4bc82b 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -45,6 +45,7 @@ #include "lltabcontainer.h" #include "lltextbox.h" #include "lltrans.h" +#include "llviewerwindow.h" ///---------------------------------------------------------------------------- /// LLPanelMarketplaceListings @@ -982,3 +983,18 @@ void LLFloaterItemProperties::onOpen(const LLSD& key) } } +LLMultiItemProperties::LLMultiItemProperties(const LLSD& key) + : LLMultiFloater(LLSD()) +{ + // start with a small rect in the top-left corner ; will get resized + LLRect rect; + rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 350, 350); + setRect(rect); + LLFloater* last_floater = LLFloaterReg::getLastFloaterInGroup(key.asString()); + if (last_floater) + { + stackWith(*last_floater); + } + setTitle(LLTrans::getString("MultiPropertiesTitle")); + buildTabContainer(); +} -- cgit v1.2.3 From a777a0b27ed6adfa99d708e289e704915f2b62b7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 7 Mar 2023 21:51:14 +0200 Subject: SL-18629 WIP Replacing UDP creation messages with callback based AIS --- indra/newview/llfloatermarketplacelistings.cpp | 35 ++++++++++++++++++-------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 58bd4bc82b..88fff58fc8 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -230,18 +230,31 @@ void LLPanelMarketplaceListings::onTabChange() void LLPanelMarketplaceListings::onAddButtonClicked() { - // Find active panel - LLInventoryPanel* panel = (LLInventoryPanel*)getChild("marketplace_filter_tabs")->getCurrentPanel(); - if (panel) - { - 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); - gInventory.notifyObservers(); - panel->setSelectionByID(category, TRUE); - panel->getRootFolder()->setNeedsAutoRename(TRUE); + LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); + llassert(marketplacelistings_id.notNull()); + LLFolderType::EType preferred_type = LLFolderType::lookup("category"); + LLHandle handle = getHandle(); + gInventory.createNewCategory( + marketplacelistings_id, + preferred_type, + LLStringUtil::null, + [handle](const LLUUID &new_cat_id) + { + // Find active panel + LLPanel *marketplace_panel = handle.get(); + if (!marketplace_panel) + { + return; + } + LLInventoryPanel* panel = (LLInventoryPanel*)marketplace_panel->getChild("marketplace_filter_tabs")->getCurrentPanel(); + if (panel) + { + gInventory.notifyObservers(); + panel->setSelectionByID(new_cat_id, TRUE); + panel->getRootFolder()->setNeedsAutoRename(TRUE); + } } + ); } void LLPanelMarketplaceListings::onAuditButtonClicked() -- cgit v1.2.3 From 811da7dbb1bdbf04a2dceb02ad4d296db4274076 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 7 Mar 2023 22:39:36 +0200 Subject: SL-18629 WIP Replacing UDP creation messages with callback based AIS #2 findCategory and move_item_to_marketplacelistings --- indra/newview/llfloatermarketplacelistings.cpp | 49 +++++++++++++++++++++----- 1 file changed, 40 insertions(+), 9 deletions(-) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 88fff58fc8..9110d9e902 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -230,7 +230,7 @@ void LLPanelMarketplaceListings::onTabChange() void LLPanelMarketplaceListings::onAddButtonClicked() { - LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); + LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); llassert(marketplacelistings_id.notNull()); LLFolderType::EType preferred_type = LLFolderType::lookup("category"); LLHandle handle = getHandle(); @@ -375,6 +375,7 @@ LLFloaterMarketplaceListings::LLFloaterMarketplaceListings(const LLSD& key) , mInventoryTitle(NULL) , mPanelListings(NULL) , mPanelListingsSet(false) +, mRootFolderCreating(false) { } @@ -460,15 +461,39 @@ void LLFloaterMarketplaceListings::setRootFolder() // If we are *not* a merchant or we have no market place connection established yet, do nothing return; } + if (!gInventory.isInventoryUsable()) + { + return; + } + LLFolderType::EType preferred_type = LLFolderType::FT_MARKETPLACE_LISTINGS; // We are a merchant. Get the Marketplace listings folder, create it if needs be. - LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, true); - if (marketplacelistings_id.isNull()) - { - // We should never get there unless the inventory fails badly - LL_ERRS("SLM") << "Inventory problem: failure to create the marketplace listings folder for a merchant!" << LL_ENDL; - return; - } + LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(preferred_type); + + if (marketplacelistings_id.isNull()) + { + if (!mRootFolderCreating) + { + mRootFolderCreating = true; + gInventory.createNewCategory( + gInventory.getRootFolderID(), + preferred_type, + LLStringUtil::null, + [preferred_type](const LLUUID &new_cat_id) + { + LLFloaterMarketplaceListings *marketplace = LLFloaterReg::findTypedInstance("marketplace_listings"); + if (marketplace) + { + // will call setRootFolder again + marketplace->updateView(); + } + } + ); + } + return; + } + + mRootFolderCreating = false; // No longer need to observe new category creation if (mCategoryAddedObserver && gInventory.containsObserver(mCategoryAddedObserver)) @@ -486,6 +511,7 @@ void LLFloaterMarketplaceListings::setRootFolder() } mRootFolderId = marketplacelistings_id; + mRootFolderCreating = true; } void LLFloaterMarketplaceListings::setPanels() @@ -556,6 +582,11 @@ void LLFloaterMarketplaceListings::updateView() { setRootFolder(); } + if (mRootFolderCreating) + { + // waiting for callback + return; + } // Update the bottom initializing status and progress dial if we are initializing or if we're a merchant and still loading if ((mkt_status <= MarketplaceStatusCodes::MARKET_PLACE_INITIALIZING) || (is_merchant && (data_fetched <= MarketplaceFetchCodes::MARKET_FETCH_LOADING)) ) @@ -859,7 +890,7 @@ void LLFloaterMarketplaceValidation::onOpen(const LLSD& key) LLUUID cat_id(key.asUUID()); if (cat_id.isNull()) { - cat_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); + cat_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); } // Validates the folder -- cgit v1.2.3 From ff6ff01c6a3822c8160279fecd3c3f2e636c4349 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 10 Mar 2023 00:12:16 +0200 Subject: SL-18629 Replacing UDP creation messages with callback based AIS --- indra/newview/llfloatermarketplacelistings.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 9110d9e902..b547150b56 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -896,8 +896,11 @@ void LLFloaterMarketplaceValidation::onOpen(const LLSD& key) // Validates the folder if (cat_id.notNull()) { - LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); - validate_marketplacelistings(cat, boost::bind(&LLFloaterMarketplaceValidation::appendMessage, this, _1, _2, _3), false); + LLMarketplaceValidator::getInstance()->validateMarketplaceListings( + cat_id, + NULL, + boost::bind(&LLFloaterMarketplaceValidation::appendMessage, this, _1, _2, _3), + false); } // Handle the listing folder being processed -- cgit v1.2.3 From 1699bdbea75c47cf763d8a11078897c37c2599a3 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Sat, 11 Mar 2023 14:05:00 +0200 Subject: mac build fix --- indra/newview/llfloatermarketplacelistings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index b547150b56..70c0d2aafd 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -479,7 +479,7 @@ void LLFloaterMarketplaceListings::setRootFolder() gInventory.getRootFolderID(), preferred_type, LLStringUtil::null, - [preferred_type](const LLUUID &new_cat_id) + [](const LLUUID &new_cat_id) { LLFloaterMarketplaceListings *marketplace = LLFloaterReg::findTypedInstance("marketplace_listings"); if (marketplace) -- cgit v1.2.3 From a77cdfdbba1eb557f204721c2cf8f875e1c34bc1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 31 Mar 2023 01:20:39 +0300 Subject: SL-19495 Marketplace listings do not load in marketplace floater --- indra/newview/llfloatermarketplacelistings.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 70c0d2aafd..df5347718c 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -511,7 +511,6 @@ void LLFloaterMarketplaceListings::setRootFolder() } mRootFolderId = marketplacelistings_id; - mRootFolderCreating = true; } void LLFloaterMarketplaceListings::setPanels() -- cgit v1.2.3 From af30c8c95b81e99c76bd5e08dcaab4c31dfdcac1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 11 Apr 2023 21:20:30 +0300 Subject: SL-19533 Don't try to restart fetchexcessively No real point restarting, but due to significant changes decided to keep this around and raise asserts instead of removing. --- indra/newview/llfloatermarketplacelistings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index df5347718c..c09e9f523d 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -448,7 +448,7 @@ void LLFloaterMarketplaceListings::fetchContents() { LLMarketplaceData::instance().setDataFetchedSignal(boost::bind(&LLFloaterMarketplaceListings::updateView, this)); LLMarketplaceData::instance().setSLMDataFetched(MarketplaceFetchCodes::MARKET_FETCH_LOADING); - LLInventoryModelBackgroundFetch::instance().start(mRootFolderId); + LLInventoryModelBackgroundFetch::instance().start(mRootFolderId, true); LLMarketplaceData::instance().getSLMListings(); } } -- cgit v1.2.3 From d882609973c0430f4cad5d09d1e9571d585578a8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 21 Aug 2023 21:15:55 +0300 Subject: SL-18629 Marketplace folder creation loop avoidance Probably shouldn't happen since we do not allow logins without caps, but to be sure added validation. --- indra/newview/llfloatermarketplacelistings.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloatermarketplacelistings.cpp') diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index c09e9f523d..71b3b16809 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -481,11 +481,22 @@ void LLFloaterMarketplaceListings::setRootFolder() LLStringUtil::null, [](const LLUUID &new_cat_id) { - LLFloaterMarketplaceListings *marketplace = LLFloaterReg::findTypedInstance("marketplace_listings"); + LLFloaterMarketplaceListings* marketplace = LLFloaterReg::findTypedInstance("marketplace_listings"); if (marketplace) { - // will call setRootFolder again - marketplace->updateView(); + if (new_cat_id.notNull()) + { + // will call setRootFolder again + marketplace->updateView(); + } + // don't update in case of failure, createNewCategory can return + // immediately if cap is missing and will cause a loop + else + { + // unblock + marketplace->mRootFolderCreating = false; + LL_WARNS("SLM") << "Inventory warning: Failed to create marketplace listings folder for a merchant" << LL_ENDL; + } } } ); -- cgit v1.2.3