diff options
author | Bill Curtis <bill.curtis@gmail.com> | 2010-11-19 14:11:42 -0800 |
---|---|---|
committer | Bill Curtis <bill.curtis@gmail.com> | 2010-11-19 14:11:42 -0800 |
commit | 066d8c39cae11d25dcf72f98bfccd4339973ed42 (patch) | |
tree | 8debcaecdd87271f618daeb8500e7032968c5202 /indra/newview/llsidetray.cpp | |
parent | cb8b30864f08947a23379eabcac63c2ceee62f7c (diff) | |
parent | 3337ef16cee97e26b45aa07518d34d031bdc75fa (diff) |
Automated merge with file:///Users/Bill/Projects/viewer-release
Diffstat (limited to 'indra/newview/llsidetray.cpp')
-rw-r--r-- | indra/newview/llsidetray.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index b7470c03bc..81b2fc0ae0 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -32,6 +32,8 @@ #include "llappviewer.h" #include "llbottomtray.h" #include "llfloaterreg.h" +#include "llfirstuse.h" +#include "llhints.h" #include "llsidetray.h" #include "llviewerwindow.h" #include "llaccordionctrl.h" @@ -115,7 +117,7 @@ public: }; protected: LLSideTrayTab(const Params& params); - + void dock(); void undock(LLFloater* floater_tab); @@ -136,7 +138,7 @@ public: const std::string& getTabTitle() const { return mTabTitle;} void onOpen (const LLSD& key); - + void toggleTabDocked(); LLPanel *getPanel(); @@ -598,7 +600,7 @@ void LLSideTray::toggleTabButton(LLSideTrayTab* tab) { LLButton* btn = it->second; bool new_state = !btn->getToggleState(); - btn->setToggleState(new_state); + btn->setToggleState(new_state); // Only highlight the tab if side tray is expanded (STORM-157). btn->setImageOverlay( new_state && !getCollapsed() ? tab->mImageSelected : tab->mImage ); } @@ -676,7 +678,7 @@ bool LLSideTray::selectTabByName(const std::string& name, bool keep_prev_visible { // Keep previously active tab visible if requested. if (keep_prev_visible) tab_to_keep_visible = mActiveTab; - toggleTabButton(mActiveTab); + toggleTabButton(mActiveTab); } //select new tab @@ -684,9 +686,9 @@ bool LLSideTray::selectTabByName(const std::string& name, bool keep_prev_visible if (mActiveTab) { - toggleTabButton(mActiveTab); - LLSD key;//empty - mActiveTab->onOpen(key); + toggleTabButton(mActiveTab); + LLSD key;//empty + mActiveTab->onOpen(key); } //arrange(); @@ -898,6 +900,7 @@ void LLSideTray::createButtons () { mCollapseButton = createButton(name,sidebar_tab->mImage,sidebar_tab->getTabTitle(), boost::bind(&LLSideTray::onToggleCollapse, this)); + LLHints::registerHintTarget("side_panel_btn", mCollapseButton->getHandle()); } else { @@ -906,6 +909,8 @@ void LLSideTray::createButtons () mTabButtons[name] = button; } } + LLHints::registerHintTarget("inventory_btn", mTabButtons["sidebar_inventory"]->getHandle()); + LLHints::registerHintTarget("dest_guide_btn", mTabButtons["sidebar_places"]->getHandle()); } void LLSideTray::processTriState () @@ -944,6 +949,7 @@ void LLSideTray::onTabButtonClick(string name) void LLSideTray::onToggleCollapse() { + LLFirstUse::notUsingSidePanel(false); if(mCollapsed) { expandSideBar(); @@ -1148,11 +1154,11 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para { LLPanel* panel = openChildPanel(*child_it, panel_name, params); if (panel) return panel; - } + } // Look up the tab in the list of attached tabs. for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) - { + { LLPanel* panel = openChildPanel(*child_it, panel_name, params); if (panel) return panel; } |