diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 5639cbef34..5d326d4ec8 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -98,11 +98,10 @@ 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();
+ void onOnlyCoalescedFilterCommit(); // Commit method for the Only Coalesced Filter checkbox
+ void onShowLinksFilterCommit(); // Commit method for the Show Links Filter combo box
// [FIRE-35042]
void onPermissionsChanged(); // FIRE-1175 - Filter Permissions Menu
@@ -122,7 +121,8 @@ private:
LLCheckBoxCtrl* mCreatorOthers;
LLInventoryFilter* mFilter;
// [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
- LLCheckBoxCtrl* mOnlyCoalescedFilterCheck; // Store the pointer to the Only Coalesced filter checkbox
+ LLCheckBoxCtrl* mOnlyCoalescedFilterCheck; // Stores the pointer to the Only Coalesced filter checkbox
+ LLComboBox* mShowLinksFilterCombo; // Stores the pointer to the Show Links filter combo box
// [FIRE-35042]
};
@@ -200,6 +200,12 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
mEnableCallbackRegistrar.add("Inventory.GearDefault.Visible", boost::bind(&LLPanelMainInventory::isActionVisible, this, _2));
//
+ // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
+ // Added new button to show all filters, not just Only Coalesced Filter
+ // Add a call back on the existing Inventory ShowFilters Check on the show_filters_inv_btn
+ mEnableCallbackRegistrar.add("Inventory.ShowFilters.Check", boost::bind(&LLPanelMainInventory::isAnyFilterChecked, this, _2));
+ // [FIRE-35042]
+
mSavedFolderState = new LLSaveFolderState();
mSavedFolderState->setApply(false);
@@ -917,6 +923,31 @@ bool LLPanelMainInventory::isSortByChecked(const LLSD& userdata)
}
// Sort By menu handlers
+// [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
+// Callback method used to update the Show Filter button on the inventory bottom UI
+bool LLPanelMainInventory::isAnyFilterChecked(const LLSD& userdata)
+{
+ // Validate that the command came from the right check box (Show Filters Modified)
+ const std::string command_name = userdata.asString();
+ if (command_name == "show_filters_modified")
+ {
+ // Only use thte active panel if it is valid
+ if (mActivePanel)
+ {
+ // Get the current filter object
+ LLInventoryFilter& filter = getCurrentFilter();
+ // If either of the three filter checks are true, Is Not Default, Filter Creator Type is not set to all creators,
+ // and Show Folder State is set to show folder state then we need to turn on the Show Filter Button check higlight,
+ // so return true if any of these are true.
+ return filter.isNotDefault() || filter.getFilterCreatorType() != LLInventoryFilter::FILTERCREATOR_ALL ||
+ filter.getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS;
+ }
+ }
+
+ return false;
+}
+// [FIRE-35042]
+
// static
bool LLPanelMainInventory::filtersVisible(void* user_data)
{
@@ -1545,13 +1576,19 @@ bool LLFloaterInventoryFinder::postBuild()
// [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 the checkbox could be found, then set the commit callback to onOnlyCoalescedFilterCommit to update the mFilter object
+ // with the value in the checkbox.
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));
+ }
+ // Get the Finder's Show Links Filter combobox for use later as well to also prevent having to call get child everytime accessing it.
+ mShowLinksFilterCombo = getChild("inventory_filter_show_links_combo");
+ // If the combobox could be found, then set the commit callback to onShowLinksFilterCommit to update the mFilter object
+ // with the value in the checkbox.
+ if (mShowLinksFilterCombo)
+ {
+ mShowLinksFilterCombo->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onShowLinksFilterCommit, this));
}
// [FIRE-35042]
@@ -1559,7 +1596,7 @@ bool LLFloaterInventoryFinder::postBuild()
// FIRE-5160: Don't reset inventory filter when clearing search term
getChild("btnReset")->setClickedCallback(boost::bind(&LLFloaterInventoryFinder::onResetBtn, this));
-
+
updateElementsFromFilter();
// FIRE-1175 - Filter Permissions Menu
@@ -1624,14 +1661,16 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
return;
// Get data needed for filter display
- U32 filter_types = (U32)mFilter->getFilterObjectTypes();
- LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState();
- U32 hours = mFilter->getHoursAgo();
- U32 date_search_direction = mFilter->getDateSearchDirection();
+ U32 filter_types = (U32)mFilter->getFilterObjectTypes();
+ LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState();
+ U32 hours = mFilter->getHoursAgo();
+ U32 date_search_direction = mFilter->getDateSearchDirection();
LLInventoryFilter::EFilterCreatorType filter_creator = mFilter->getFilterCreatorType();
- bool show_created_by_me = ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_SELF));
- bool show_created_by_others = ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_OTHERS));
+ bool show_created_by_me =
+ ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_SELF));
+ bool show_created_by_others =
+ ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_OTHERS));
// update the ui elements
// Make floater title translatable
@@ -1639,19 +1678,19 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
setTitle(LLTrans::getString(mFilter->getName()));
//
- getChild("check_animation")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_ANIMATION));
+ getChild("check_animation")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_ANIMATION));
- getChild("check_calling_card")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_CALLINGCARD));
- getChild("check_clothing")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_WEARABLE));
- getChild("check_gesture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_GESTURE));
- getChild("check_landmark")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LANDMARK));
- getChild("check_material")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_MATERIAL));
- getChild("check_notecard")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_NOTECARD));
- getChild("check_object")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_OBJECT));
- getChild("check_script")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LSL));
- getChild("check_sound")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SOUND));
- getChild("check_texture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE));
- getChild("check_snapshot")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT));
+ getChild("check_calling_card")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_CALLINGCARD));
+ getChild("check_clothing")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_WEARABLE));
+ getChild("check_gesture")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_GESTURE));
+ getChild("check_landmark")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_LANDMARK));
+ getChild("check_material")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_MATERIAL));
+ getChild("check_notecard")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_NOTECARD));
+ getChild("check_object")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_OBJECT));
+ getChild("check_script")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_LSL));
+ getChild("check_sound")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SOUND));
+ getChild("check_texture")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_TEXTURE));
+ getChild("check_snapshot")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT));
getChild("check_settings")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SETTINGS));
getChild("check_show_empty")->setValue(show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS);
@@ -1664,10 +1703,30 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
getChild("date_search_direction")->setSelectedIndex(date_search_direction);
// FIRE-1175 - Filter Permissions Menu
- getChild("check_modify")->setValue((bool) (mFilter->getFilterPermissions() & PERM_MODIFY));
- getChild("check_copy")->setValue((bool) (mFilter->getFilterPermissions() & PERM_COPY));
- getChild("check_transfer")->setValue((bool) (mFilter->getFilterPermissions() & PERM_TRANSFER));
+ getChild("check_modify")->setValue((bool)(mFilter->getFilterPermissions() & PERM_MODIFY));
+ getChild("check_copy")->setValue((bool)(mFilter->getFilterPermissions() & PERM_COPY));
+ getChild("check_transfer")->setValue((bool)(mFilter->getFilterPermissions() & PERM_TRANSFER));
//
+
+ // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
+ // Sync the Only Coalesced Filter Checkbox with the value from the mFilter
+ // Make sure the Only Coalseced Filter checkbox and the filter are valid before accessing them.
+ if (mOnlyCoalescedFilterCheck && mFilter)
+ {
+ // Set the check value to the value of the UI to the Only Coalesced Objects of the mFilter
+ mOnlyCoalescedFilterCheck->set(mFilter->getFilterCoalescedObjects());
+ }
+ // Sync the Show Links Filter combo box with the value from the mFilter
+ // Make sure the Show Links Filter combo box and filter are both valid
+ if (mShowLinksFilterCombo && mFilter)
+ {
+ // Set the combo box value to the value of the FitlerLinks of the mFilter
+ // In the UI, the choices match the same values as the filter values
+ // 0 - Show Links, 2 Show Links Only, 1 = Hide Links
+ // So we convert from the filters from U64 to LLSD (integer) as the SelectByValue takes a LLSD object as an input
+ mShowLinksFilterCombo->selectByValue(LLSD(mFilter->getFilterLinks()));
+ }
+ // [FIRE-35042]
}
void LLFloaterInventoryFinder::draw()
@@ -1864,41 +1923,6 @@ 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()
{
@@ -1923,6 +1947,30 @@ void LLFloaterInventoryFinder::onPermissionsChanged()
}
//
+// [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
+// Callback method used to update the mFilter's Only Coalesced filter and syncs with the main inventory filter
+void LLFloaterInventoryFinder::onOnlyCoalescedFilterCommit()
+{
+ // This will sync the Filter panels value with the value of the mFilter object
+ if (mOnlyCoalescedFilterCheck && mFilter)
+ {
+ // Set the mFilter's Filter Coalesced Objects value to the Only Coalesced Filter Checkbox value
+ mFilter->setFilterCoalescedObjects(mOnlyCoalescedFilterCheck->getValue());
+ }
+}
+// Callback method used to update the mFilter's Show Links filter and syncs with the main inventory filter
+void LLFloaterInventoryFinder::onShowLinksFilterCommit()
+{
+ // This will sync the Show Links combo box with the value of the main inventory filter
+ if (mShowLinksFilterCombo)
+ {
+ // Set the mFilter's Filter Links value to the selected value of the Show Links Filter Combo.
+ // The values match up to the bit values that are used by the filter (0 = Show Links, 1 = Show Links Only, 2 = Hide Links)
+ mFilter->setFilterLinks((U64)mShowLinksFilterCombo->getSelectedValue().asInteger());
+ }
+}
+// [FIRE-35042]
+
bool LLFloaterInventoryFinder::getCheckShowEmpty()
{
return getChild("check_show_empty")->getValue();
@@ -2809,6 +2857,14 @@ void LLPanelMainInventory::onCoalescedObjectsToggled(const LLSD& userdata)
{
getActivePanel()->setFilterCoalescedObjects(!getActivePanel()->getFilterCoalescedObjects());
}
+
+ // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
+ // Update the Filter Finder window with the change to the filters, so they can sync
+ if (getFinder())
+ {
+ getFinder()->updateElementsFromFilter();
+ }
+ // [FIRE-35042]
}
bool LLPanelMainInventory::isCoalescedObjectsChecked(const LLSD& userdata)
@@ -2841,6 +2897,13 @@ void LLPanelMainInventory::onFilterLinksChecked(const LLSD& userdata)
{
getActivePanel()->setFilterLinks(LLInventoryFilter::FILTERLINK_EXCLUDE_LINKS);
}
+ // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
+ // Update the Filter Finder window with the change to the filters, so they can sync
+ if (getFinder())
+ {
+ getFinder()->updateElementsFromFilter();
+ }
+ // [FIRE-35042]
}
bool LLPanelMainInventory::isFilterLinksChecked(const LLSD& userdata)
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 91e08e485f..1589909b79 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -189,6 +189,12 @@ protected:
bool isSortByChecked(const LLSD& userdata);
// Sort By menu handlers
+ // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
+ // Callback method for the new Show Filter button on the bottom button panel of the main inventory.
+ // Stays highlighted if any filter is enabled.
+ bool isAnyFilterChecked(const LLSD& userdata);
+ // [FIRE-35042]
+
void saveTexture(const LLSD& userdata);
bool isSaveTextureEnabled(const LLSD& userdata);
void updateItemcountText();
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 0068fa8e78..45a9723ad4 100644
--- a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml
@@ -565,11 +565,9 @@
parameter="only_transfer" />
-
-
+ label="Only Coalesced">
@@ -577,7 +575,6 @@
function="Inventory.CoalescedObjects.Check"
parameter="coalesced_objects_only" />
-
@@ -744,8 +741,7 @@
-
-
+
@@ -1004,40 +1000,39 @@
-
-
+
-
-
+
+
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 d891330924..7977c9b970 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,17 +1,17 @@
-
+
-
+
-->
-
+
+
-
+ width="16" />
+
+
+
+
+
+
+
+
-->
-
-
+ label="Only Coalesced">
-
-
+
[FIRE-35042] Inventory - Only Coalesced Filter - More accessible -->
-
-
+
@@ -418,35 +417,34 @@
-
-
+
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml
index 7019b57a72..c05081b333 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml
@@ -1211,7 +1211,6 @@
width="270"
control_name="FSSplitInventorySearchOverTabs"
tool_tip="If enabled, it is possible to enter a different search term for each tab in inventory."/>
-
diff --git a/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml b/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml
index 52d2d4fc4d..1dfee9b078 100644
--- a/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml
@@ -184,8 +184,7 @@
-
-
+
@@ -417,35 +416,34 @@
-
-
+
diff --git a/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml b/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml
index 576b6bb00f..158955867c 100644
--- a/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml
@@ -186,8 +186,7 @@
-
-
+
@@ -420,35 +419,34 @@
-
-
+