From 53a486649381af53d21de28aced388bc2aacac0f Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 26 Sep 2011 17:38:10 -0700 Subject: 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. --- indra/newview/llfloatertoybox.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatertoybox.cpp') 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; -- cgit v1.2.3