From ac3f1b54ec6484442ea302570c14707e8bb263d2 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 1 Feb 2023 18:44:26 +0200 Subject: SL-19104 Clean up inventory UI to prepare for thumbnails (#66) --- indra/newview/llinventoryfilter.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 707ff2b7b6..855de7a362 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -596,6 +596,9 @@ bool LLInventoryFilter::checkAgainstSearchVisibility(const LLFolderViewModelItem if (is_link && ((mFilterOps.mSearchVisibility & VISIBILITY_LINKS) == 0)) return FALSE; + if (listener->isItemInOutfits() && ((mFilterOps.mSearchVisibility & VISIBILITY_OUTFITS) == 0)) + return FALSE; + if (listener->isItemInTrash() && ((mFilterOps.mSearchVisibility & VISIBILITY_TRASH) == 0)) return FALSE; @@ -792,6 +795,24 @@ void LLInventoryFilter::toggleSearchVisibilityLinks() } } +void LLInventoryFilter::toggleSearchVisibilityOutfits() +{ + bool hide_outfits = mFilterOps.mSearchVisibility & VISIBILITY_OUTFITS; + if (hide_outfits) + { + mFilterOps.mSearchVisibility &= ~VISIBILITY_OUTFITS; + } + else + { + mFilterOps.mSearchVisibility |= VISIBILITY_OUTFITS; + } + + if (hasFilterString()) + { + setModified(hide_outfits ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE); + } +} + void LLInventoryFilter::toggleSearchVisibilityTrash() { bool hide_trash = mFilterOps.mSearchVisibility & VISIBILITY_TRASH; -- cgit v1.2.3 From 734b1b5d421254c45b3eb0fe0a5bbc8159e489fc Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 17 Feb 2023 15:47:03 +0200 Subject: SL-19105 WIP Single-folder inventory view --- indra/newview/llinventoryfilter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index ea3525205a..d6110b3cd5 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -81,7 +81,8 @@ LLInventoryFilter::LLInventoryFilter(const Params& p) mCurrentGeneration(0), mFirstRequiredGeneration(0), mFirstSuccessGeneration(0), - mSearchType(SEARCHTYPE_NAME) + mSearchType(SEARCHTYPE_NAME), + mSingleFolderMode(false) { // copy mFilterOps into mDefaultFilterOps markDefault(); @@ -1626,7 +1627,7 @@ bool LLInventoryFilter::areDateLimitsSet() bool LLInventoryFilter::showAllResults() const { - return hasFilterString(); + return hasFilterString() && !mSingleFolderMode; } -- cgit v1.2.3 From ac145cb21f382b8eab9f770cecfa23ea9d58aac6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 14 Mar 2023 23:21:26 +0200 Subject: SL-18629 WIP Fetch Inventory using AIS caps --- indra/newview/llinventoryfilter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index d6110b3cd5..6e09161473 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -202,7 +202,7 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const { // At the moment background fetch only cares about VERSION_UNKNOWN, // so do not check isCategoryComplete that compares descendant count - LLInventoryModelBackgroundFetch::instance().start(folder_id); + LLInventoryModelBackgroundFetch::instance().start(folder_id, false); } } -- cgit v1.2.3 From 9fa64f1e2087a8e45adad7298d2dd3661bd80e25 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 24 Mar 2023 18:03:09 +0200 Subject: SL-18003 Fix items not being marked as complete when fetched via ais --- indra/newview/llinventoryfilter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 6e09161473..0af383f232 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -195,7 +195,8 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const // when applying a filter, matching folders get their contents downloaded first // but make sure we are not interfering with pre-download if (isNotDefault() - && LLStartUp::getStartupState() > STATE_WEARABLES_WAIT) + && LLStartUp::getStartupState() > STATE_WEARABLES_WAIT + && !LLInventoryModelBackgroundFetch::instance().inventoryFetchInProgress()) { LLViewerInventoryCategory* cat = gInventory.getCategory(folder_id); if (!cat || (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)) -- cgit v1.2.3 From 58092382269eb8dc48fb30734ee3738f7385f8da Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 4 Apr 2023 16:38:53 +0300 Subject: SL-19273 Show empty folder message for empty folders regardless of filter state --- indra/newview/llinventoryfilter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 0af383f232..5a300bad32 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -1603,9 +1603,9 @@ void LLInventoryFilter::setDefaultEmptyLookupMessage(const std::string& message) mDefaultEmptyLookupMessage = message; } -std::string LLInventoryFilter::getEmptyLookupMessage() const +std::string LLInventoryFilter::getEmptyLookupMessage(bool is_empty_folder) const { - if (isDefault() && !mDefaultEmptyLookupMessage.empty()) + if ((isDefault() || is_empty_folder) && !mDefaultEmptyLookupMessage.empty()) { return LLTrans::getString(mDefaultEmptyLookupMessage); } -- cgit v1.2.3 From cc39c1e852b1b8ad0e6dc2bb7907b8116c716c1d Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 6 Apr 2023 19:51:08 +0300 Subject: SL-19544 preparation for Combination view --- indra/newview/llinventoryfilter.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 5a300bad32..5c02b61522 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -63,6 +63,7 @@ LLInventoryFilter::FilterOps::FilterOps(const Params& p) mFilterTypes(p.types), mFilterUUID(p.uuid), mFilterLinks(p.links), + mFilterThumbnails(p.thumbnails), mSearchVisibility(p.search_visibility) { } @@ -158,6 +159,8 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item) passed = passed && checkAgainstCreator(listener); passed = passed && checkAgainstSearchVisibility(listener); + passed = passed && checkAgainstFilterThumbnails(listener->getUUID()); + return passed; } @@ -567,6 +570,19 @@ bool LLInventoryFilter::checkAgainstFilterLinks(const LLFolderViewModelItemInven return TRUE; } +bool LLInventoryFilter::checkAgainstFilterThumbnails(const LLUUID& object_id) const +{ + const LLInventoryObject *object = gInventory.getObject(object_id); + if (!object) return true; + + const bool is_thumbnail = object->getThumbnailUUID().notNull(); + if (is_thumbnail && (mFilterOps.mFilterThumbnails == FILTER_EXCLUDE_THUMBNAILS)) + return false; + if (!is_thumbnail && (mFilterOps.mFilterThumbnails == FILTER_ONLY_THUMBNAILS)) + return false; + return true; +} + bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory* listener) const { if (!listener) return TRUE; @@ -738,6 +754,19 @@ void LLInventoryFilter::setFilterSettingsTypes(U64 types) mFilterOps.mFilterTypes |= FILTERTYPE_SETTINGS; } +void LLInventoryFilter::setFilterThumbnails(U64 filter_thumbnails) +{ + if (mFilterOps.mFilterThumbnails != filter_thumbnails) + { + if (mFilterOps.mFilterThumbnails == FILTER_EXCLUDE_THUMBNAILS || + mFilterOps.mFilterThumbnails == FILTER_ONLY_THUMBNAILS) + setModified(FILTER_MORE_RESTRICTIVE); + else + setModified(FILTER_LESS_RESTRICTIVE); + } + mFilterOps.mFilterThumbnails = filter_thumbnails; +} + void LLInventoryFilter::setFilterEmptySystemFolders() { mFilterOps.mFilterTypes |= FILTERTYPE_EMPTYFOLDERS; @@ -1526,6 +1555,11 @@ U64 LLInventoryFilter::getSearchVisibilityTypes() const return mFilterOps.mSearchVisibility; } +U64 LLInventoryFilter::getFilterThumbnails() const +{ + return mFilterOps.mFilterThumbnails; +} + bool LLInventoryFilter::hasFilterString() const { return mFilterSubString.size() > 0; -- cgit v1.2.3 From c9a025e3d0aee9a894f341c1eeb6b216bbe74a4c Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 24 Apr 2023 16:55:15 +0300 Subject: SL-19642 FIXED Outfit folders with thumbnails are displayed both in gallery and inventory panels in Combination view --- indra/newview/llinventoryfilter.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 5c02b61522..d8e7b8ca67 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -195,6 +195,11 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const return true; } + if(!checkAgainstFilterThumbnails(folder_id)) + { + return false; + } + // when applying a filter, matching folders get their contents downloaded first // but make sure we are not interfering with pre-download if (isNotDefault() -- cgit v1.2.3 From c008d3e030ca4019e24de9a4831dc36727555fd2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 25 Apr 2023 12:25:15 +0300 Subject: SL-19533 Reduce inventory fetch stalls --- indra/newview/llinventoryfilter.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index d8e7b8ca67..5d6c3be168 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -195,11 +195,6 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const return true; } - if(!checkAgainstFilterThumbnails(folder_id)) - { - return false; - } - // when applying a filter, matching folders get their contents downloaded first // but make sure we are not interfering with pre-download if (isNotDefault() @@ -207,7 +202,7 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const && !LLInventoryModelBackgroundFetch::instance().inventoryFetchInProgress()) { LLViewerInventoryCategory* cat = gInventory.getCategory(folder_id); - if (!cat || (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)) + if ((!cat && folder_id.notNull()) || (cat && cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)) { // At the moment background fetch only cares about VERSION_UNKNOWN, // so do not check isCategoryComplete that compares descendant count @@ -215,6 +210,11 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const } } + if (!checkAgainstFilterThumbnails(folder_id)) + { + return false; + } + // Marketplace folder filtering const U32 filterTypes = mFilterOps.mFilterTypes; const U32 marketplace_filter = FILTERTYPE_MARKETPLACE_ACTIVE | FILTERTYPE_MARKETPLACE_INACTIVE | -- cgit v1.2.3 From 87d24252df91284eb0cd9ab2f08b376ded05554c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 2 Jun 2023 01:58:30 +0300 Subject: SL-19795 Remove extra panels, reuse combination ones instead --- indra/newview/llinventoryfilter.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 5d6c3be168..5cf6c3fb7d 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -763,11 +763,24 @@ void LLInventoryFilter::setFilterThumbnails(U64 filter_thumbnails) { if (mFilterOps.mFilterThumbnails != filter_thumbnails) { - if (mFilterOps.mFilterThumbnails == FILTER_EXCLUDE_THUMBNAILS || - mFilterOps.mFilterThumbnails == FILTER_ONLY_THUMBNAILS) + if (mFilterOps.mFilterThumbnails == FILTER_EXCLUDE_THUMBNAILS + && filter_thumbnails == FILTER_ONLY_THUMBNAILS) + { + setModified(FILTER_RESTART); + } + else if (mFilterOps.mFilterThumbnails == FILTER_ONLY_THUMBNAILS + && filter_thumbnails == FILTER_EXCLUDE_THUMBNAILS) + { + setModified(FILTER_RESTART); + } + else if (mFilterOps.mFilterThumbnails == FILTER_INCLUDE_THUMBNAILS) + { setModified(FILTER_MORE_RESTRICTIVE); + } else + { setModified(FILTER_LESS_RESTRICTIVE); + } } mFilterOps.mFilterThumbnails = filter_thumbnails; } -- cgit v1.2.3