From 645811c6ef3134a540fc1bc7d32d7bdb8fa35046 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 1 May 2024 03:16:47 +0300 Subject: Viewer#1301 Implement Inventory Favorites Tab WIP --- indra/newview/llpanelmaininventory.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 20241aac24..b1bfd52bc6 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -67,6 +67,7 @@ const std::string FILTERS_FILENAME("filters.xml"); const std::string ALL_ITEMS("All Items"); const std::string RECENT_ITEMS("Recent Items"); const std::string WORN_ITEMS("Worn Items"); +const std::string FAVORITES("Favorites"); static LLPanelInjector t_inventory("panel_main_inventory"); @@ -193,6 +194,19 @@ BOOL LLPanelMainInventory::postBuild() worn_filter.markDefault(); mWornItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mWornItemsPanel, _1, _2)); } + + LLInventoryPanel* favorites_panel = getChild(FAVORITES); + if (favorites_panel) + { + favorites_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER)); + favorites_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); + LLInventoryFilter& favorites_filter = favorites_panel->getFilter(); + favorites_filter.setFilterFavorites(LLInventoryFilter::FILTER_ONLY_FAVORITES); + favorites_filter.setEmptyLookupMessage("InventoryNoMatchingFavorites"); + favorites_filter.markDefault(); + favorites_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, favorites_panel, _1, _2)); + } + mSearchTypeCombo = getChild("search_type"); if(mSearchTypeCombo) { -- cgit v1.2.3 From fc5e5327bca83846bb97cb7ff578b0dcb3a8892e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 2 May 2024 03:05:41 +0300 Subject: Viewer#1301 Implement Inventory Favorites Tab WIP#2 --- indra/newview/llpanelmaininventory.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index b1bfd52bc6..c41fedec20 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -199,9 +199,7 @@ BOOL LLPanelMainInventory::postBuild() if (favorites_panel) { favorites_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER)); - favorites_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); LLInventoryFilter& favorites_filter = favorites_panel->getFilter(); - favorites_filter.setFilterFavorites(LLInventoryFilter::FILTER_ONLY_FAVORITES); favorites_filter.setEmptyLookupMessage("InventoryNoMatchingFavorites"); favorites_filter.markDefault(); favorites_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, favorites_panel, _1, _2)); -- cgit v1.2.3 From 2d11e10a906f10f6cd682cc154f9cb5cce7828f6 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 10 Jan 2025 19:45:22 +0200 Subject: #3377 Select 'All items' tab when creating a folder via '+' button --- indra/newview/llpanelmaininventory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 6ddd306039..3008fb69d6 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -572,7 +572,8 @@ void LLPanelMainInventory::doCreate(const LLSD& userdata) } else { - menu_create_inventory_item(getPanel(), NULL, userdata); + selectAllItemsPanel(); + menu_create_inventory_item(mAllItemsPanel, NULL, userdata); } } -- cgit v1.2.3