diff options
Diffstat (limited to 'indra/newview/llsidetray.cpp')
-rw-r--r-- | indra/newview/llsidetray.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index fba1503b4a..fed39c362e 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -34,7 +34,8 @@ #include "lltextbox.h" -#include "llagent.h" +#include "llagentcamera.h" +#include "llappviewer.h" #include "llbottomtray.h" #include "llsidetray.h" #include "llviewerwindow.h" @@ -272,9 +273,18 @@ BOOL LLSideTray::postBuild() collapseSideBar(); setMouseOpaque(false); + + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSideTray::handleLoginComplete, this)); + return true; } +void LLSideTray::handleLoginComplete() +{ + //reset tab to "home" tab if it was changesd during login process + selectTabByName("sidebar_home"); +} + LLSideTrayTab* LLSideTray::getTab(const std::string& name) { return getChild<LLSideTrayTab>(name,false); @@ -469,6 +479,9 @@ void LLSideTray::reflectCollapseChange() } gFloaterView->refresh(); + + LLSD new_value = mCollapsed; + mCollapseSignal(this,new_value); } void LLSideTray::arrange() @@ -546,7 +559,6 @@ void LLSideTray::collapseSideBar() //mActiveTab->setVisible(FALSE); reflectCollapseChange(); setFocus( FALSE ); - } void LLSideTray::expandSideBar() @@ -571,7 +583,6 @@ void LLSideTray::expandSideBar() LLButton* btn = btn_it->second; btn->setImageOverlay( mActiveTab->mImageSelected ); } - } void LLSideTray::highlightFocused() @@ -638,6 +649,7 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para { panel->onOpen(params); } + return panel; } } @@ -720,17 +732,12 @@ bool LLSideTray::isPanelActive(const std::string& panel_name) return (panel->getName() == panel_name); } - -// *TODO: Eliminate magic constants. -static const S32 fake_offset = 132; -static const S32 fake_top_offset = 18; - void LLSideTray::updateSidetrayVisibility() { // set visibility of parent container based on collapsed state if (getParent()) { - getParent()->setVisible(!mCollapsed && !gAgent.cameraMouselook()); + getParent()->setVisible(!mCollapsed && !gAgentCamera.cameraMouselook()); } } |