From 46531cea8475741f9144f787fec8be371de082e6 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 28 Feb 2023 14:35:44 +0200 Subject: SL-19285 Add 'Close all windows' to Gear menu --- indra/newview/llpanelmaininventory.cpp | 14 ++++++++++++++ .../skins/default/xui/en/menu_inventory_gear_default.xml | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 9bfea7fe2b..6b7e447e69 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1489,6 +1489,20 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) LLFloaterReg::showInstance("linkreplace", params); } + if (command_name == "close_inv_windows") + { + LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); + for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end();) + { + LLFloaterSidePanelContainer* iv = dynamic_cast(*iter++); + if (iv) + { + iv->closeFloater(); + } + } + LLFloaterReg::hideInstance("inventory_settings"); + } + if (command_name == "toggle_search_outfits") { mActivePanel->getFilter().toggleSearchVisibilityOutfits(); diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml index d2bd33a44c..50e24824fe 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml @@ -16,7 +16,7 @@ parameter="new_window" />