summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-11 20:41:24 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-11 20:41:24 -0500
commit9b1680927f474992d0f2f4313c7d7b9f730862f4 (patch)
treea25a78684655a14188b5c18f59ad70154de22e0f /indra/newview/llsidetray.cpp
parentbcdd3c25b6bcfaac7849e9aad6fd6c9bb2da1e82 (diff)
parent7eb8bb4ad18c313c178bb7977adee8e0044b14b7 (diff)
merge
Diffstat (limited to 'indra/newview/llsidetray.cpp')
-rw-r--r--indra/newview/llsidetray.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 3d0b4de88a..70dc04f575 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -101,6 +101,7 @@ LLSideTray* LLSideTray::getInstance()
if (!sInstance)
{
sInstance = LLUICtrlFactory::createFromFile<LLSideTray>("panel_side_tray.xml",NULL, LLRootView::child_registry_t::instance());
+ sInstance->setXMLFilename("panel_side_tray.xml");
}
return sInstance;
@@ -353,7 +354,8 @@ bool LLSideTray::selectTabByName (const std::string& name)
return true;
}
-LLButton* LLSideTray::createButton (const std::string& name,const std::string& image,LLUICtrl::commit_callback_t callback)
+LLButton* LLSideTray::createButton (const std::string& name,const std::string& image,const std::string& tooltip,
+ LLUICtrl::commit_callback_t callback)
{
static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
@@ -374,6 +376,9 @@ LLButton* LLSideTray::createButton (const std::string& name,const std::string& i
LLButton* button = LLUICtrlFactory::create<LLButton> (bparams);
button->setLabel(name);
button->setClickedCallback(callback);
+
+ if(tooltip!="Home")
+ button->setToolTip(tooltip);
if(image.length())
{
@@ -412,12 +417,12 @@ void LLSideTray::createButtons ()
// change if the home screen becomes its own tab.
if (name == "sidebar_home")
{
- mCollapseButton = createButton("",sidebar_tab->mImage,
+ mCollapseButton = createButton("",sidebar_tab->mImage,sidebar_tab->getTabTitle(),
boost::bind(&LLSideTray::onToggleCollapse, this));
}
else
{
- LLButton* button = createButton("",sidebar_tab->mImage,
+ LLButton* button = createButton("",sidebar_tab->mImage,sidebar_tab->getTabTitle(),
boost::bind(&LLSideTray::onTabButtonClick, this, name));
mTabButtons[name] = button;
}