summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-04-09 15:51:28 -0700
committerMerov Linden <merov@lindenlab.com>2014-04-09 15:51:28 -0700
commita0f5a63a661d3ebc03e82463897c63dd35918749 (patch)
tree8f7bceebff18bc2614b5433a47817640f517744c /indra/newview
parent748bbeaf982c456b120d4b3f4d33aa6dce576908 (diff)
DD-16 : WIP : Fix filtering on menu and tabs. Sort still not done
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llinventoryfilter.cpp38
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_marketplace_view.xml2
2 files changed, 23 insertions, 17 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 6a800cf5ba..cf5e87c717 100755
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -33,6 +33,7 @@
#include "llfolderviewitem.h"
#include "llinventorymodel.h"
#include "llinventorymodelbackgroundfetch.h"
+#include "llinventoryfunctions.h"
#include "llmarketplacefunctions.h"
#include "llviewercontrol.h"
#include "llfolderview.h"
@@ -133,29 +134,34 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
}
// Marketplace folder filtering
- const U32 filterTypes = mFilterOps.mFilterTypes;
- if (filterTypes & FILTERTYPE_MARKETPLACE_ACTIVE)
- {
- if (!LLMarketplaceData::instance().getActivationState(folder_id))
+ S32 depth = depth_nesting_in_marketplace(folder_id);
+ if (depth > 0)
+ {
+ const U32 filterTypes = mFilterOps.mFilterTypes;
+ LLUUID listing_uuid = nested_parent_id(folder_id, depth);
+ if (filterTypes & FILTERTYPE_MARKETPLACE_ACTIVE)
{
- return false;
+ if (!LLMarketplaceData::instance().getActivationState(listing_uuid))
+ {
+ return false;
+ }
}
- }
- if (filterTypes & FILTERTYPE_MARKETPLACE_INACTIVE)
- {
- if (LLMarketplaceData::instance().getActivationState(folder_id))
+ else if (filterTypes & FILTERTYPE_MARKETPLACE_INACTIVE)
{
- return false;
+ if (!LLMarketplaceData::instance().isListed(listing_uuid) || LLMarketplaceData::instance().getActivationState(listing_uuid))
+ {
+ return false;
+ }
}
- }
- if (filterTypes & FILTERTYPE_MARKETPLACE_UNASSOCIATED)
- {
- if (!LLMarketplaceData::instance().getListingID(folder_id).empty())
+ else if (filterTypes & FILTERTYPE_MARKETPLACE_UNASSOCIATED)
{
- return false;
+ if (LLMarketplaceData::instance().isListed(listing_uuid))
+ {
+ return false;
+ }
}
}
-
+
// Always check against the clipboard
const BOOL passed_clipboard = checkAgainstClipboard(folder_id);
diff --git a/indra/newview/skins/default/xui/en/menu_marketplace_view.xml b/indra/newview/skins/default/xui/en/menu_marketplace_view.xml
index 4043c5c93d..d08cb23483 100755
--- a/indra/newview/skins/default/xui/en/menu_marketplace_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_marketplace_view.xml
@@ -30,7 +30,7 @@
function="Marketplace.ViewSort.CheckItem"
parameter="show_unassociated" />
</menu_item_check>
- <menu_item_check name="show_active" label="Show Active Listings and Folders Only">
+ <menu_item_check name="show_active" label="Show Active Listings Only">
<menu_item_check.on_click
function="Marketplace.ViewSort.Action"
parameter="show_active" />