diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-05-11 18:16:24 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-05-11 18:16:24 +0300 |
commit | 3392d5805e00cdbce1d269ee2da4f0c14b9a03c9 (patch) | |
tree | 99d88bdeea77f7b3603021abef89deae68d78078 /indra/newview | |
parent | ed78b2b938bb473beb0a8d6004f522ed39218c32 (diff) |
SL-15199 Remember search results state after minimizing when pressing CTRL+F
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 27 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 3 |
2 files changed, 28 insertions, 2 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9d05f59b09..bbfe67404f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6150,6 +6150,32 @@ class LLAvatarToggleMyProfile : public view_listener_t } }; +class LLAvatarToggleSearch : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLFloater* instance = LLFloaterReg::findInstance("search"); + if (LLFloater::isMinimized(instance)) + { + instance->setMinimized(FALSE); + instance->setFocus(TRUE); + } + else if (!LLFloater::isShown(instance)) + { + LLFloaterReg::showInstance("search"); + } + else if (!instance->hasFocus() && !instance->getIsChrome()) + { + instance->setFocus(TRUE); + } + else + { + instance->closeFloater(); + } + return true; + } +}; + class LLAvatarResetSkeleton: public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -9280,6 +9306,7 @@ void initialize_menus() enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall)); view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse"); view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile"); + view_listener_t::addMenu(new LLAvatarToggleSearch(), "Avatar.ToggleSearch"); view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton"); view_listener_t::addMenu(new LLAvatarEnableResetSkeleton(), "Avatar.EnableResetSkeleton"); view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0a50ff089f..ac69f5a748 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -487,8 +487,7 @@ function="Floater.Visible" parameter="search" /> <menu_item_check.on_click - function="Floater.Toggle" - parameter="search" /> + function="Avatar.ToggleSearch"/> </menu_item_check> <menu_item_separator/> <menu_item_call |