diff options
Diffstat (limited to 'linden/indra/newview/llinventoryview.cpp')
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index a265906..1e16b92 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -547,6 +547,15 @@ void LLInventoryView::init(LLInventoryModel* inventory) | |||
547 | recent_items_panel->getFilter()->markDefault(); | 547 | recent_items_panel->getFilter()->markDefault(); |
548 | recent_items_panel->setSelectCallback(onSelectionChange, recent_items_panel); | 548 | recent_items_panel->setSelectCallback(onSelectionChange, recent_items_panel); |
549 | } | 549 | } |
550 | LLInventoryPanel* worn_items_panel = getChild<LLInventoryPanel>("Worn Items"); | ||
551 | if (worn_items_panel) | ||
552 | { | ||
553 | worn_items_panel->setSortOrder(gSavedSettings.getU32("InventorySortOrder")); | ||
554 | worn_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); | ||
555 | worn_items_panel->getFilter()->markDefault(); | ||
556 | worn_items_panel->setFilterWorn(true); | ||
557 | worn_items_panel->setSelectCallback(onSelectionChange, worn_items_panel); | ||
558 | } | ||
550 | 559 | ||
551 | // Now load the stored settings from disk, if available. | 560 | // Now load the stored settings from disk, if available. |
552 | std::ostringstream filterSaveName; | 561 | std::ostringstream filterSaveName; |
@@ -595,6 +604,7 @@ BOOL LLInventoryView::postBuild() | |||
595 | { | 604 | { |
596 | childSetTabChangeCallback("inventory filter tabs", "All Items", onFilterSelected, this); | 605 | childSetTabChangeCallback("inventory filter tabs", "All Items", onFilterSelected, this); |
597 | childSetTabChangeCallback("inventory filter tabs", "Recent Items", onFilterSelected, this); | 606 | childSetTabChangeCallback("inventory filter tabs", "Recent Items", onFilterSelected, this); |
607 | childSetTabChangeCallback("inventory filter tabs", "Worn Items", onFilterSelected, this); | ||
598 | //panel->getFilter()->markDefault(); | 608 | //panel->getFilter()->markDefault(); |
599 | return TRUE; | 609 | return TRUE; |
600 | } | 610 | } |
@@ -621,6 +631,15 @@ LLInventoryView::~LLInventoryView( void ) | |||
621 | filter->toLLSD(filterState); | 631 | filter->toLLSD(filterState); |
622 | filterRoot[filter->getName()] = filterState; | 632 | filterRoot[filter->getName()] = filterState; |
623 | } | 633 | } |
634 | |||
635 | LLInventoryPanel* worn_items_panel = getChild<LLInventoryPanel>("Worn Items"); | ||
636 | if (worn_items_panel) | ||
637 | { | ||
638 | LLInventoryFilter* filter = worn_items_panel->getFilter(); | ||
639 | LLSD filterState; | ||
640 | filter->toLLSD(filterState); | ||
641 | filterRoot[filter->getName()] = filterState; | ||
642 | } | ||
624 | 643 | ||
625 | std::ostringstream filterSaveName; | 644 | std::ostringstream filterSaveName; |
626 | filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml"); | 645 | filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml"); |
@@ -1653,6 +1672,11 @@ void LLInventoryPanel::setFilterSubString(const std::string& string) | |||
1653 | mFolders->getFilter()->setFilterSubString(string); | 1672 | mFolders->getFilter()->setFilterSubString(string); |
1654 | } | 1673 | } |
1655 | 1674 | ||
1675 | void LLInventoryPanel::setFilterWorn(bool worn) | ||
1676 | { | ||
1677 | mFolders->getFilter()->setFilterWorn(worn); | ||
1678 | } | ||
1679 | |||
1656 | void LLInventoryPanel::setSortOrder(U32 order) | 1680 | void LLInventoryPanel::setSortOrder(U32 order) |
1657 | { | 1681 | { |
1658 | mFolders->getFilter()->setSortOrder(order); | 1682 | mFolders->getFilter()->setSortOrder(order); |