From ffbc1b4b53328540894377500d07f84d396993dd Mon Sep 17 00:00:00 2001 From: minerjr Date: Thu, 2 Jan 2025 10:45:41 -0400 Subject: [PATCH] [FIRE-35042] Inventory - Only Coalesced Filter - More accessible Added new button to panel_main_inventory.xml called only_coalesced_inv_btn and panel that can toggle on the Only Coalesced filter and added a tool_tip as well to explain the feature. "Only Combined (Clumps) - Enables filter that displays only Combined Objects (Clumps) which are made up of 2 or more prims" Added new combo box item filter_type_coalesced to Filter to allow setting the Only Coalesced flag and switching the filter to Objects as only objects can be coalesced. Added new checkbox with icon to the float_inventory_view_finder.xml that is linked to the Only Coalesced flag and can modify it. Changed label from "Only Coalesced" to "Only Combined (Clumps)" to make it more descriptive and match the UI verbiage that creates the Coalesced objects. Updated UI xml for all English skin variants. Added new texture coalesced_18.png for the new button. Gray Scaled version of the Inv_Object_Multi object - inv_item_object_multi_.tga with a size of 18x18 pixels. --- indra/newview/llpanelmaininventory.cpp | 68 ++++++++++++++++++ .../ansastorm/xui/en/panel_main_inventory.xml | 44 +++++++++++- .../textures/bottomtray/coalesced_18.png | Bin 0 -> 1188 bytes .../skins/default/textures/textures.xml | 5 +- .../xui/en/floater_inventory_view_finder.xml | 25 ++++++- .../xui/en/menu_inventory_gear_default.xml | 5 +- .../default/xui/en/panel_main_inventory.xml | 39 ++++++++++ .../starlight/xui/en/panel_main_inventory.xml | 39 ++++++++++ .../xui/en/panel_main_inventory.xml | 39 ++++++++++ 9 files changed, 260 insertions(+), 4 deletions(-) create mode 100644 indra/newview/skins/default/textures/bottomtray/coalesced_18.png diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 122afcc8e6..5639cbef34 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -98,6 +98,12 @@ public: void onCreatorSelfFilterCommit(); void onCreatorOtherFilterCommit(); + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + // Callback to check the value of the check box to sync with the main inventory Only Coalesced flag + bool isOnlyCoalescedFilterChecked(); + // Callback for new checkbox to modify the main inventory's Only Colesced filter (Combined (Clumps)) + void onOnlyCoalescedFilterCommit(); + // [FIRE-35042] void onPermissionsChanged(); // FIRE-1175 - Filter Permissions Menu @@ -115,6 +121,9 @@ private: LLCheckBoxCtrl* mCreatorSelf; LLCheckBoxCtrl* mCreatorOthers; LLInventoryFilter* mFilter; + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + LLCheckBoxCtrl* mOnlyCoalescedFilterCheck; // Store the pointer to the Only Coalesced filter checkbox + // [FIRE-35042] }; ///---------------------------------------------------------------------------- @@ -1074,6 +1083,17 @@ void LLPanelMainInventory::onFilterTypeSelected(const std::string& filter_type_n return; } + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + // Special treatment for "coalesced" filter + else if (filter_type_name == "filter_type_coalesced") + { + // Turn on Only Coalesced filter. This will also trigger the button "only_coalesced_inv_btn" + // and menu item check "inventory_filter_coalesced_objects_only" toggle states. + getActivePanel()->setFilterCoalescedObjects(true); + // As all Coalesced objects are only objects, then set the filter type to filter_type_objects + filterTypes = mFilterMap["filter_type_objects"]; + } + // [FIRE-35042] // invalid selection (broken XML?) else { @@ -1522,6 +1542,19 @@ bool LLFloaterInventoryFinder::postBuild() mCreatorSelf->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onCreatorSelfFilterCommit, this)); mCreatorOthers->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onCreatorOtherFilterCommit, this)); + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + // Get the Finder's Only Coalesced check box for use later on, instead of calling getChild everytime accessing it + mOnlyCoalescedFilterCheck = getChild("check_only_coalesced"); + // Add callbacks only if the checkbox is available + if (mOnlyCoalescedFilterCheck) + { + // Set a callback for when the check_only_coalesced checkbox is pressed to change the value of the main panel. + mOnlyCoalescedFilterCheck->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onOnlyCoalescedFilterCommit, this)); + // Set a callback for syncing the check_only_coalesced check state to the Only Coalesced flag of the main inventory + mOnlyCoalescedFilterCheck->setCheckCallback(boost::bind(&LLFloaterInventoryFinder::isOnlyCoalescedFilterChecked, this)); + } + // [FIRE-35042] + childSetAction("Close", onCloseBtn, this); // FIRE-5160: Don't reset inventory filter when clearing search term @@ -1831,6 +1864,41 @@ void LLFloaterInventoryFinder::onCreatorOtherFilterCommit() } } +// [FIRE-35042] Inventory - Only Coalesced Filter - More accessible +// Callback function that controls setting the actual Only Coalesced filter flag in the Main Inventory when the check_coalesced checkbox is changed by the user +void LLFloaterInventoryFinder::onOnlyCoalescedFilterCommit() +{ + // If the Main Inventory Panel and the Finder's OnlyCoalescedFilterCheck are both valid (should be, but just in case) + if (mPanelMainInventory && mOnlyCoalescedFilterCheck) + { + // Make sure the main panel exists before trying to set the Filter Coalesced Objects value to the check_only_coalesced checkbox value + LLInventoryPanel* main_panel = mPanelMainInventory->getPanel(); + if (main_panel) + { + main_panel->setFilterCoalescedObjects(mOnlyCoalescedFilterCheck->getValue()); + } + } + +} +// Callback function that syncs the Finder's Only Coalesced checkbox to the main panel's FilterCoalescedObjects value +bool LLFloaterInventoryFinder::isOnlyCoalescedFilterChecked() +{ + // Check if the Main Inventory Panel exists (should be, but just in case) + if (mPanelMainInventory) + { + // Make sure the main panel exists before trying to get the Filter Coalesced Objects + LLInventoryPanel* main_panel = mPanelMainInventory->getPanel(); + if (main_panel) + { + //Return the Only Coalesced filter value from the main inventory + return main_panel->getFilterCoalescedObjects(); + } + } + //If the main panel cannot be accessed at this time, just return false + return false; +} +// [FIRE-35042] + // FIRE-1175 - Filter Permissions Menu void LLFloaterInventoryFinder::onPermissionsChanged() { diff --git a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml index 63596de5fa..0068fa8e78 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml @@ -565,9 +565,11 @@ parameter="only_transfer" /> + + + label="Only Combined (Clumps)"> @@ -575,6 +577,7 @@ function="Inventory.CoalescedObjects.Check" parameter="coalesced_objects_only" /> + @@ -738,6 +741,12 @@ + + + + + + @@ -994,6 +1003,39 @@ parameter="secondary_inventory" /> + + + + + + + + EX>4Tx04R}tkv&MmP!xqvQ$>*$2Q!E`WT-CMMMWG-6^me@v=v%)FnQ@8G-*gu zTpR`0f`dPcRRx##3oJ%eXJX18Y>3L$2SSod~(#5Q7YQ!_d5mnPEU&wi^ za^B*sRqL#MPJY8sL0`#moz^H4SV9shNKjBm1y$IH(qAXVLYnsDKK>EcpCXq+t_m1A z7Epr*+4Y0J!SC5x#px+8DHI2KUmWLS4CvbhS`EkfK6aee2@re+uJn$-)&%B0NpEzt z$PqBO4P0DzG-VIC+yRE44B3=jDM(8w7J>IOdZs)ubPEiud2?&;Y*083B)LJRJZ40-;GnK~y-)wUjYPBU==Pzw8DP zZ6ZvtN-`@bGXxTwX~rN)da+Y0nMP|15lmy&CY^6Bv~(IRB%F9WE)2skYqeVXw*_Qbc2-wc zMXS{kuIq|ou_$z17qTonrfC|TPABy9+^3%f%H^`Ds;XQnl_-@;+}+)AaBu)XKA)GH z&89g$J?$8VVLFZ@zf+TC+0k`fSe7MR*A=eoifXkgB9VvyL?jXs)oQi>=DM!f-`^Ly zu8VX!T?6#t6a|3m>uaLX=)XWnl0-I}rQ7YIY1+qO|5rUdJ>mQQFKK@Ucz%A)-{0R8 z4u^Srd&BcQJkMi$dz+b=8C=(;QmN4E^%xl$;pXOsv9U2OE-q*^8uWU-ul$oyE|(Lj zR7yyaB!-5DL_8jUN3qpviOtPT5s5^^z`%fzBuQkmS)pl~00{n=kD@5pwoS2Eq}^^~ z7zXq6^DHbZ0MPArX}8+|%+1XK^htl1k)kMUZEZ0-JInF$F_V*%OifL3dV0#@;v$kH z^?P4lUg$d-9UZL~3Wankl_DGt^O4I+rSguH@B5scoe_)0>U~G`dOdS=bo6C-c=+4y z?(U;)+jyS$A)VLPSA5^+>gwwI-rioOUax2V_v5D1>6)slVrgkf - + + + + diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml index 633ba579d9..d891330924 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml @@ -1,14 +1,17 @@ + + + + + + + + --> + + + label="Only Combined (Clumps)"> @@ -410,6 +412,7 @@ function="Inventory.CoalescedObjects.Check" parameter="coalesced_objects_only" /> + + + + + + + @@ -411,6 +417,39 @@ parameter="secondary_inventory" /> + + + + + + + + + + + + + + @@ -410,6 +416,39 @@ parameter="secondary_inventory" /> + + + + + + + + + + + + + + @@ -413,6 +419,39 @@ parameter="secondary_inventory" /> + + + + + + + +