diff options
| author | Steve Bennetts <steve@lindenlab.com> | 2009-11-24 12:42:14 -0800 |
|---|---|---|
| committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-24 12:42:14 -0800 |
| commit | 9e2d78aca1fa96e96b4b324cabfb0efeb26f7397 (patch) | |
| tree | 042a161e9bc2608d0098b2ea745178384f466362 /indra/newview/llpanelpeople.cpp | |
| parent | f9081220accfe5c197f1c567af8806bde236f946 (diff) | |
| parent | 04cf3fefca230f4f2c351dddebb36e691a9f7bc5 (diff) | |
Merge from product-engine
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()) |
