summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolbarview.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-10-31 12:05:56 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-10-31 12:05:56 -0700
commit948b56e7c288471ce87838d12cb17b3f34885274 (patch)
treee653f7c0bb40f2c044a3a5e34495376278bce0dc /indra/newview/lltoolbarview.cpp
parent130d017085a4fa609970245a49b6d1a97de404b2 (diff)
* Added "clear all" button to the toybox floater with corresponding functions
added to LLToolBarView to perform the action. * Updated toybox to new height size per XD.
Diffstat (limited to 'indra/newview/lltoolbarview.cpp')
-rw-r--r--indra/newview/lltoolbarview.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index ed1dfbb8cd..5ff0ccfeb2 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -315,6 +315,19 @@ bool LLToolBarView::loadToolbars(bool force_default)
return true;
}
+bool LLToolBarView::clearToolbars()
+{
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ if (mToolbars[i])
+ {
+ mToolbars[i]->clearCommandsList();
+ }
+ }
+
+ return true;
+}
+
//static
bool LLToolBarView::loadDefaultToolbars()
{
@@ -332,6 +345,23 @@ bool LLToolBarView::loadDefaultToolbars()
return retval;
}
+//static
+bool LLToolBarView::clearAllToolbars()
+{
+ bool retval = false;
+
+ if (gToolBarView)
+ {
+ retval = gToolBarView->clearToolbars();
+ if (retval)
+ {
+ gToolBarView->saveToolbars();
+ }
+ }
+
+ return retval;
+}
+
void LLToolBarView::saveToolbars() const
{
if (!mToolbarsLoaded)