diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-10 12:43:17 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-10 12:43:17 +0200 |
commit | f15767bbef4e0a87aa032e265b3a0a8d4db907e1 (patch) | |
tree | 9be7b18daf2869bfec48a26eead8ebd1cd115c1f | |
parent | 9dacb6b79e8c7568e7a9aaa9cb12090383241a47 (diff) |
merge
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llsidetray.cpp | 43 | ||||
-rw-r--r-- | indra/newview/llsidetray.h | 2 |
2 files changed, 41 insertions, 4 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index a11ee05532..b25dea92cc 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -460,16 +460,51 @@ void LLSideTray::createButtons () } } +void LLSideTray::processTriState () +{ + if(mCollapsed) + expandSideBar(); + else + { + //!!!!!!!!!!!!!!!!! + //** HARDCODED!!!!! + //!!!!!!!!!!!!!!!!! + + //there is no common way to determine "default" panel for tab + //so default panels for now will be hardcoded + + //hardcoded for people tab and profile tab + + /*if(mActiveTab == getTab("sidebar_people")) + { + LLSideTrayPanelContainer* container = findChild<LLSideTrayPanelContainer>("panel_container"); + if(container && container->getCurrentPanelIndex()>0) + { + container->onOpen(LLSD().insert("sub_panel_name","panel_people")); + } + else + collapseSideBar(); + } + else if(mActiveTab == getTab("sidebar_me")) + { + LLTabContainer* tab_container = findChild<LLTabContainer>("tabs"); + if(tab_container && tab_container->getCurrentPanelIndex()>0) + tab_container->selectFirstTab(); + else + collapseSideBar(); + } + else*/ + collapseSideBar(); + } +} + void LLSideTray::onTabButtonClick(string name) { LLSideTrayTab* side_bar = getTab(name); if(side_bar == mActiveTab) { - if(mCollapsed) - expandSideBar(); - else - collapseSideBar(); + processTriState (); return; } selectTabByName (name); diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index b49251ec79..246979ac54 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -135,6 +135,8 @@ public: S32 getTrayWidth(); void resetPanelRect (); + + void processTriState (); protected: |