summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateroutbox.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-03-20 09:31:35 -0700
committerMerov Linden <merov@lindenlab.com>2014-03-20 09:31:35 -0700
commit03622e0833fd2d2bdcc9ed3ed0c009ad9e9fee3e (patch)
tree5f6dca211b3b175b24941c538355f4820435685b /indra/newview/llfloateroutbox.cpp
parentb502e596af25b5f6f93e766b473a1ee2eed0b3ec (diff)
DD-50 : Adding new filter code for marketplace filtered tabs (active, unactive and unassociated)
Diffstat (limited to 'indra/newview/llfloateroutbox.cpp')
-rwxr-xr-xindra/newview/llfloateroutbox.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp
index 92c120a0b6..d6da0ad971 100755
--- a/indra/newview/llfloateroutbox.cpp
+++ b/indra/newview/llfloateroutbox.cpp
@@ -831,16 +831,9 @@ void LLFloaterMarketplaceListings::setup()
llassert(mCategoriesObserver);
// Set up the marketplace listings inventory view
-// LLInventoryPanel* inventory_panel = mInventoryPanel.get();
-// if (inventory_panel)
-// {
-// delete inventory_panel;
-// }
-// inventory_panel = LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_marketplace_listings_inventory.xml", mInventoryPlaceholder->getParent(), LLInventoryPanel::child_registry_t::instance());
-// mInventoryPanel = inventory_panel->getInventoryPanelHandle();
LLPanel* inventory_panel = LLUICtrlFactory::createFromFile<LLPanel>("panel_marketplace_listings_inventory.xml", mInventoryPlaceholder->getParent(), LLInventoryPanel::child_registry_t::instance());
- LLInventoryPanel* all_items_panel = inventory_panel->getChild<LLInventoryPanel>("All Items");
- mInventoryPanel = all_items_panel->getInventoryPanelHandle();
+ LLInventoryPanel* items_panel = inventory_panel->getChild<LLInventoryPanel>("All Items");
+ mInventoryPanel = items_panel->getInventoryPanelHandle();
llassert(mInventoryPanel.get() != NULL);
// Reshape the inventory to the proper size
@@ -848,9 +841,23 @@ void LLFloaterMarketplaceListings::setup()
inventory_panel->setShape(inventory_placeholder_rect);
// Set the sort order newest to oldest
- all_items_panel->getFolderViewModel()->setSorter(LLInventoryFilter::SO_FOLDERS_BY_NAME);
- all_items_panel->getFilter().markDefault();
+ items_panel->getFolderViewModel()->setSorter(LLInventoryFilter::SO_FOLDERS_BY_NAME);
+ items_panel->getFilter().markDefault();
+ // Set filters on the 3 prefiltered panels
+ items_panel = inventory_panel->getChild<LLInventoryPanel>("Active Items");
+ items_panel->getFolderViewModel()->setSorter(LLInventoryFilter::SO_FOLDERS_BY_NAME);
+ items_panel->getFilter().setFilterMarketplaceActiveFolders();
+ items_panel->getFilter().markDefault();
+ items_panel = inventory_panel->getChild<LLInventoryPanel>("Inactive Items");
+ items_panel->getFolderViewModel()->setSorter(LLInventoryFilter::SO_FOLDERS_BY_NAME);
+ items_panel->getFilter().setFilterMarketplaceInactiveFolders();
+ items_panel->getFilter().markDefault();
+ items_panel = inventory_panel->getChild<LLInventoryPanel>("Unassociated Items");
+ items_panel->getFolderViewModel()->setSorter(LLInventoryFilter::SO_FOLDERS_BY_NAME);
+ items_panel->getFilter().setFilterMarketplaceUnassociatedFolders();
+ items_panel->getFilter().markDefault();
+
// Get the content of the marketplace listings folder
fetchContents();
}
@@ -969,8 +976,7 @@ BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BO
EAcceptance* accept,
std::string& tooltip_msg)
{
- if ((mInventoryPanel.get() == NULL) ||
- mRootFolderId.isNull())
+ if ((mInventoryPanel.get() == NULL) || mRootFolderId.isNull())
{
return FALSE;
}