summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertoybox.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-09-26 17:38:10 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-09-26 17:38:10 -0700
commit53a486649381af53d21de28aced388bc2aacac0f (patch)
tree9b7378da2c05e9dbd0c7a594b12d242e87ddf0dd /indra/newview/llfloatertoybox.cpp
parentbb1776de6865715b2dd96185140d35e46d63c837 (diff)
EXP-1205 PROGRESS -- As a User, I want a toybox which will contain all buttons that I can d&d into the toolbars
* Command buttons are now enabled/disabled in toybox based on whether or not the LLToolBarView has them anywhere. * Commands now have argument to specify whether or not they should be in the toybox. * LLCommandId is now used a universal reference for commands. Reviewed by Richard.
Diffstat (limited to 'indra/newview/llfloatertoybox.cpp')
-rw-r--r--indra/newview/llfloatertoybox.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
index eaaaeb3357..beb928ea36 100644
--- a/indra/newview/llfloatertoybox.cpp
+++ b/indra/newview/llfloatertoybox.cpp
@@ -32,6 +32,7 @@
#include "llcommandmanager.h"
#include "llpanel.h"
#include "lltoolbar.h"
+#include "lltoolbarview.h"
LLFloaterToybox::LLFloaterToybox(const LLSD& key)
@@ -63,7 +64,13 @@ BOOL LLFloaterToybox::postBuild()
{
LLCommand * command = cmdMgr.getCommand(i);
- mToolBar->addCommand(command);
+ if (command->availableInToybox())
+ {
+ mToolBar->addCommand(command->id());
+
+ llassert(gToolBarView != NULL);
+ mToolBar->enableCommand(command->id(), !gToolBarView->hasCommand(command->id()));
+ }
}
return TRUE;