summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolbarview.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-11-28 10:13:34 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-11-28 10:13:34 -0500
commit5374e544ed5888548bea334bd8ca7ca53372d031 (patch)
treeb73c80d7cdc6a78ad6caed46b9485f18b3f039a7 /indra/newview/lltoolbarview.cpp
parent8c86a08e72708e96dcf67830518187a00478bbfd (diff)
parentfb605a047aa1c6b293b9546a06ac800c53d109ba (diff)
merge
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)