diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2012-08-08 18:26:19 +0300 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2012-08-08 18:26:19 +0300 |
commit | ff2bb96a55e8869843174be7324b0a59578a4f0d (patch) | |
tree | af51c382c2491131a56b1e6f131c23e9b7ce3e29 /indra/newview/llviewermenu.cpp | |
parent | ba7e1ec1d44898ba670b814b860bd0ec73c48129 (diff) |
MAINT-105 FIXED New function to check People tabs visibility
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 54efcd61a8..67cc171eef 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3464,6 +3464,20 @@ bool enable_sitdown_self() return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying(); } +class LLCheckPanelPeopleTab : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string panel_name = userdata.asString(); + + LLPanel *panel = LLFloaterSidePanelContainer::getPanel("people", panel_name); + if(panel && panel->isInVisibleChain()) + { + return true; + } + return false; + } +}; // Toggle one of "People" panel tabs in side tray. class LLTogglePanelPeopleTab : public view_listener_t { @@ -8553,6 +8567,7 @@ void initialize_menus() // we don't use boost::bind directly to delay side tray construction view_listener_t::addMenu( new LLTogglePanelPeopleTab(), "SideTray.PanelPeopleTab"); + view_listener_t::addMenu( new LLCheckPanelPeopleTab(), "SideTray.CheckPanelPeopleTab"); // Avatar pie menu view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute"); |