diff options
author | McCabe Maxsted | 2010-08-30 05:05:43 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-08-30 05:05:43 -0700 |
commit | 2f33f6edda2267fa521408854753781d40c05744 (patch) | |
tree | 6e2196dada1942b368a700b36797f249e9746844 /linden/indra/newview/llinventoryview.cpp | |
parent | Added 'Inventory' log control stuff from Snowglobe (diff) | |
download | meta-impy-2f33f6edda2267fa521408854753781d40c05744.zip meta-impy-2f33f6edda2267fa521408854753781d40c05744.tar.gz meta-impy-2f33f6edda2267fa521408854753781d40c05744.tar.bz2 meta-impy-2f33f6edda2267fa521408854753781d40c05744.tar.xz |
Fixed #455: inventory found items vanish after a certain amount of time. Also fixed several inventory search bugs by updating desc. etc. searches to the latest Emerald version
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index a001d65..71d8194 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -486,7 +486,8 @@ LLInventoryView::LLInventoryView(const std::string& name, | |||
486 | LLInventoryModel* inventory) : | 486 | LLInventoryModel* inventory) : |
487 | LLFloater(name, rect, std::string("Inventory"), RESIZE_YES, | 487 | LLFloater(name, rect, std::string("Inventory"), RESIZE_YES, |
488 | INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP, | 488 | INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP, |
489 | MINIMIZE_NO, CLOSE_YES) | 489 | MINIMIZE_NO, CLOSE_YES), |
490 | mActivePanel(NULL) | ||
490 | //LLHandle<LLFloater> mFinderHandle takes care of its own initialization | 491 | //LLHandle<LLFloater> mFinderHandle takes care of its own initialization |
491 | { | 492 | { |
492 | init(inventory); | 493 | init(inventory); |
@@ -497,7 +498,8 @@ LLInventoryView::LLInventoryView(const std::string& name, | |||
497 | LLInventoryModel* inventory) : | 498 | LLInventoryModel* inventory) : |
498 | LLFloater(name, rect, std::string("Inventory"), RESIZE_YES, | 499 | LLFloater(name, rect, std::string("Inventory"), RESIZE_YES, |
499 | INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP, | 500 | INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP, |
500 | MINIMIZE_NO, CLOSE_YES) | 501 | MINIMIZE_NO, CLOSE_YES), |
502 | mActivePanel(NULL) | ||
501 | //LLHandle<LLFloater> mFinderHandle takes care of its own initialization | 503 | //LLHandle<LLFloater> mFinderHandle takes care of its own initialization |
502 | { | 504 | { |
503 | init(inventory); | 505 | init(inventory); |
@@ -522,8 +524,8 @@ void LLInventoryView::init(LLInventoryModel* inventory) | |||
522 | addBoolControl("Inventory.FoldersAlwaysByName", sort_folders_by_name ); | 524 | addBoolControl("Inventory.FoldersAlwaysByName", sort_folders_by_name ); |
523 | addBoolControl("Inventory.SystemFoldersToTop", sort_system_folders_to_top ); | 525 | addBoolControl("Inventory.SystemFoldersToTop", sort_system_folders_to_top ); |
524 | 526 | ||
525 | //Search Controls | 527 | //Search Controls - RKeast |
526 | U32 search_type = gSavedSettings.getU32("InventorySearchType"); | 528 | U32 search_type = gSavedPerAccountSettings.getU32("InventorySearchType"); |
527 | BOOL search_by_name = (search_type == 0); | 529 | BOOL search_by_name = (search_type == 0); |
528 | 530 | ||
529 | addBoolControl("Inventory.SearchByName", search_by_name); | 531 | addBoolControl("Inventory.SearchByName", search_by_name); |
@@ -544,6 +546,10 @@ void LLInventoryView::init(LLInventoryModel* inventory) | |||
544 | if (mActivePanel) | 546 | if (mActivePanel) |
545 | { | 547 | { |
546 | // "All Items" is the previous only view, so it gets the InventorySortOrder | 548 | // "All Items" is the previous only view, so it gets the InventorySortOrder |
549 | |||
550 | //Fix for gSavedSettings use - rkeast | ||
551 | mActivePanel->getFilter()->setSearchType(search_type); | ||
552 | |||
547 | mActivePanel->setSortOrder(gSavedSettings.getU32("InventorySortOrder")); | 553 | mActivePanel->setSortOrder(gSavedSettings.getU32("InventorySortOrder")); |
548 | mActivePanel->getFilter()->markDefault(); | 554 | mActivePanel->getFilter()->markDefault(); |
549 | mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); | 555 | mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); |
@@ -580,7 +586,7 @@ void LLInventoryView::init(LLInventoryModel* inventory) | |||
580 | file.close(); | 586 | file.close(); |
581 | 587 | ||
582 | // Load the persistent "Recent Items" settings. | 588 | // Load the persistent "Recent Items" settings. |
583 | // Note that the "All Items" settings do not persist. | 589 | // Note that the "All Items" and "Worn Items" settings do not persist per-account. |
584 | if(recent_items_panel) | 590 | if(recent_items_panel) |
585 | { | 591 | { |
586 | if(savedFilterState.has(recent_items_panel->getFilter()->getName())) | 592 | if(savedFilterState.has(recent_items_panel->getFilter()->getName())) |
@@ -590,8 +596,7 @@ void LLInventoryView::init(LLInventoryModel* inventory) | |||
590 | recent_items_panel->getFilter()->fromLLSD(recent_items); | 596 | recent_items_panel->getFilter()->fromLLSD(recent_items); |
591 | } | 597 | } |
592 | } | 598 | } |
593 | 599 | } | |
594 | } | ||
595 | 600 | ||
596 | //Initialize item count - rkeast | 601 | //Initialize item count - rkeast |
597 | mItemCount = gSavedPerAccountSettings.getS32("InventoryPreviousCount"); | 602 | mItemCount = gSavedPerAccountSettings.getS32("InventoryPreviousCount"); |
@@ -1044,9 +1049,16 @@ void LLInventoryView::onClearSearch(void* user_data) | |||
1044 | LLInventoryView* self = (LLInventoryView*)user_data; | 1049 | LLInventoryView* self = (LLInventoryView*)user_data; |
1045 | if(!self) return; | 1050 | if(!self) return; |
1046 | 1051 | ||
1052 | LLFloater *finder = self->getFinder(); | ||
1047 | if (self->mActivePanel) | 1053 | if (self->mActivePanel) |
1048 | { | 1054 | { |
1049 | self->mActivePanel->setFilterSubString(LLStringUtil::null); | 1055 | self->mActivePanel->setFilterSubString(LLStringUtil::null); |
1056 | self->mActivePanel->setFilterTypes(LLInventoryType::NIT_ALL); | ||
1057 | } | ||
1058 | |||
1059 | if (finder) | ||
1060 | { | ||
1061 | LLInventoryViewFinder::selectAllTypes(finder); | ||
1050 | } | 1062 | } |
1051 | 1063 | ||
1052 | // re-open folders that were initially open | 1064 | // re-open folders that were initially open |
@@ -1737,6 +1749,7 @@ LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, | |||
1737 | 1749 | ||
1738 | const std::string LLInventoryPanel::DEFAULT_SORT_ORDER = std::string("InventorySortOrder"); | 1750 | const std::string LLInventoryPanel::DEFAULT_SORT_ORDER = std::string("InventorySortOrder"); |
1739 | const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("RecentItemsSortOrder"); | 1751 | const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("RecentItemsSortOrder"); |
1752 | const std::string LLInventoryPanel::WORNITEMS_SORT_ORDER = std::string("WornItemsSortOrder"); | ||
1740 | const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string(""); | 1753 | const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string(""); |
1741 | 1754 | ||
1742 | LLInventoryPanel::LLInventoryPanel(const std::string& name, | 1755 | LLInventoryPanel::LLInventoryPanel(const std::string& name, |
@@ -1867,6 +1880,19 @@ void LLInventoryPanel::draw() | |||
1867 | LLPanel::draw(); | 1880 | LLPanel::draw(); |
1868 | } | 1881 | } |
1869 | 1882 | ||
1883 | |||
1884 | //fix to get rid of gSavedSettings use - rkeast | ||
1885 | void LLInventoryPanel::setSearchType(U32 type) | ||
1886 | { | ||
1887 | mFolders->getFilter()->setSearchType(type); | ||
1888 | } | ||
1889 | |||
1890 | //fix to get rid of gSavedSettings use - rkeast | ||
1891 | U32 LLInventoryPanel::getSearchType() | ||
1892 | { | ||
1893 | return mFolders->getFilter()->getSearchType(); | ||
1894 | } | ||
1895 | |||
1870 | void LLInventoryPanel::setFilterTypes(U32 filter_types) | 1896 | void LLInventoryPanel::setFilterTypes(U32 filter_types) |
1871 | { | 1897 | { |
1872 | mFolders->getFilter()->setFilterTypes(filter_types); | 1898 | mFolders->getFilter()->setFilterTypes(filter_types); |