summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2026-02-25 13:45:30 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2026-02-25 13:45:30 +0200
commite9c4c1aacffa9eb45628f6356152a70e5a61a32b (patch)
tree5bd58156971c04c6106679f0d5a4368005cdff69 /indra/newview/llpanelmaininventory.cpp
parentaa4ad2e95da5207a1250ca5fd23f7f0e6528a44e (diff)
parent3529bc5f9d29a71355f3a3666540abff57dc1a4c (diff)
Merge branch 'release/2026.02' into maxim/flat-ui-fonts-update
# Conflicts: # indra/newview/skins/default/xui/en/panel_preferences_general.xml
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp54
1 files changed, 47 insertions, 7 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index ad7aa57842..04eebcefc1 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -216,14 +216,14 @@ bool LLPanelMainInventory::postBuild()
mWornItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mWornItemsPanel, _1, _2));
}
- LLInventoryPanel* favorites_panel = getChild<LLInventoryPanel>(FAVORITES);
- if (favorites_panel)
+ mFavoritesPanel = getChild<LLInventoryPanel>(FAVORITES);
+ if (mFavoritesPanel)
{
- favorites_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER));
- LLInventoryFilter& favorites_filter = favorites_panel->getFilter();
+ mFavoritesPanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER));
+ LLInventoryFilter& favorites_filter = mFavoritesPanel->getFilter();
favorites_filter.setEmptyLookupMessage("InventoryNoMatchingFavorites");
favorites_filter.markDefault();
- favorites_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, favorites_panel, _1, _2));
+ mFavoritesPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mFavoritesPanel, _1, _2));
}
mSearchTypeCombo = getChild<LLComboBox>("search_type");
@@ -319,6 +319,10 @@ bool LLPanelMainInventory::postBuild()
menu->getChild<LLMenuItemGL>("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str);
}
+ mFilterTabs->setTabVisibility(mRecentPanel, gSavedSettings.getBOOL("InventoryShowRecentTab"));
+ mFilterTabs->setTabVisibility(mWornItemsPanel, gSavedSettings.getBOOL("InventoryShowWornTab"));
+ mFilterTabs->setTabVisibility(mFavoritesPanel, gSavedSettings.getBOOL("InventoryShowFavoritesTab"));
+
// Trigger callback for focus received so we can deselect items in inbox/outbox
LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMainInventory::onFocusReceived, this));
@@ -1613,8 +1617,10 @@ void LLPanelMainInventory::initSingleFolderRoot(const LLUUID& start_folder_id)
void LLPanelMainInventory::initInventoryViews()
{
mAllItemsPanel->initializeViewBuilding();
- mRecentPanel->initializeViewBuilding();
- mWornItemsPanel->initializeViewBuilding();
+ if (gSavedSettings.getBOOL("InventoryShowRecentTab"))
+ mRecentPanel->initializeViewBuilding();
+ if (gSavedSettings.getBOOL("InventoryShowWornTab"))
+ mWornItemsPanel->initializeViewBuilding();
}
void LLPanelMainInventory::toggleViewMode()
@@ -2056,6 +2062,27 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
{
setViewMode(MODE_COMBINATION);
}
+
+ if (command_name == "toggle_recent_tab")
+ {
+ bool visibility = !gSavedSettings.getBOOL("InventoryShowRecentTab");
+ gSavedSettings.setBOOL("InventoryShowRecentTab", visibility);
+ mFilterTabs->setTabVisibility(mRecentPanel, visibility);
+ mRecentPanel->initializeViewBuilding();
+ }
+ if (command_name == "toggle_worn_tab")
+ {
+ bool visibility = !gSavedSettings.getBOOL("InventoryShowWornTab");
+ gSavedSettings.setBOOL("InventoryShowWornTab", visibility);
+ mFilterTabs->setTabVisibility(mWornItemsPanel, visibility);
+ mWornItemsPanel->initializeViewBuilding();
+ }
+ if (command_name == "toggle_favorites_tab")
+ {
+ bool visibility = !gSavedSettings.getBOOL("InventoryShowFavoritesTab");
+ gSavedSettings.setBOOL("InventoryShowFavoritesTab", visibility);
+ mFilterTabs->setTabVisibility(mFavoritesPanel, visibility);
+ }
}
void LLPanelMainInventory::onVisibilityChange( bool new_visibility )
@@ -2283,6 +2310,19 @@ bool LLPanelMainInventory::isActionChecked(const LLSD& userdata)
return isCombinationViewMode();
}
+ if (command_name == "recent_tab")
+ {
+ return mFilterTabs->getTabVisibility(mRecentPanel);
+ }
+ if (command_name == "worn_tab")
+ {
+ return mFilterTabs->getTabVisibility(mWornItemsPanel);
+ }
+ if (command_name == "favorites_tab")
+ {
+ return mFilterTabs->getTabVisibility(mFavoritesPanel);
+ }
+
return false;
}