diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-11-24 15:05:13 -0800 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-24 15:05:13 -0800 |
commit | fb26dd779613ea088e44fd5d85044698cf782ede (patch) | |
tree | e2908fb32ccc3c9d3b48cece2759b072aff86a62 /indra/newview/llpanelpeople.cpp | |
parent | 07a396e3119af7dd3cd56f64e066c70f8aa1b5bd (diff) | |
parent | 9e2d78aca1fa96e96b4b324cabfb0efeb26f7397 (diff) |
Merge
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 0c832defd7..f9e6e5507c 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -56,6 +56,8 @@ #include "llgrouplist.h" #include "llinventoryobserver.h" #include "llpanelpeoplemenus.h" +#include "llsidetray.h" +#include "llsidetraypanelcontainer.h" #include "llrecentpeople.h" #include "llviewercontrol.h" // for gSavedSettings #include "llviewermenu.h" // for gMenuHolder @@ -1270,6 +1272,31 @@ void LLPanelPeople::onOpen(const LLSD& key) reSelectedCurrentTab(); } +void LLPanelPeople::notifyChildren(const LLSD& info) +{ + if (info.has("task-panel-action") && info["task-panel-action"].asString() == "handle-tri-state") + { + LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(getParent()); + if (!container) + { + llwarns << "Cannot find People panel container" << llendl; + return; + } + + if (container->getCurrentPanelIndex() > 0) + { + // if not on the default panel, switch to it + container->onOpen(LLSD().insert(LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME, getName())); + } + else + LLSideTray::getInstance()->collapseSideBar(); + + return; // this notification is only supposed to be handled by task panels + } + + LLPanel::notifyChildren(info); +} + void LLPanelPeople::showAccordion(const std::string name, bool show) { if(name.empty()) |