summaryrefslogtreecommitdiff
path: root/indra/llui/lltoolbar.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-09-28 16:54:34 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-09-28 16:54:34 -0700
commitfdf042bdb9aeefa209694e04d4012a3a1f911a52 (patch)
tree37c27b51ac8d940b49073f27da35442f0c6029cc /indra/llui/lltoolbar.cpp
parentfc0f5173eb20fad8934420e6eec8873d71490894 (diff)
EXP-1205 PROGRESS -- As a User, I want a toybox which will contain all buttons that I can d&d into the toolbars
EXP-1233 FIX -- Populate the toybox floater window with all FUI toolbar buttons indicated as such in the "commands.xml" definition. EXP-1267 FIX -- Enable/disable buttons in the toybox * Hooked up button callbacks to the toolbar buttons * Fixed toybox button enable/disable to function properly and live update as buttons change states. * Removed the toybox toolbar background image Reviewed by Leyla
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
-rw-r--r--indra/llui/lltoolbar.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index c5219b11e8..45567d5859 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -500,7 +500,6 @@ void LLToolBar::createButtons()
{
createButton(command_id);
}
-
}
void LLToolBar::createButton(const LLCommandId& id)
@@ -509,12 +508,21 @@ void LLToolBar::createButton(const LLCommandId& id)
if (!commandp) return;
LLToolBarButton::Params button_p;
+ button_p.name = id.name();
button_p.label = LLTrans::getString(commandp->labelRef());
button_p.tool_tip = button_p.label();
button_p.image_overlay = LLUI::getUIImage(commandp->icon());
button_p.overwriteFrom(mButtonParams[mButtonType]);
LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p);
+ if (!mReadOnly)
+ {
+ LLUICtrl::CommitCallbackParam cbParam;
+ cbParam.function_name = commandp->functionName();
+ cbParam.parameter = commandp->parameter();
+ button->setCommitCallback(cbParam);
+ }
+
mButtons.push_back(button);
mButtonPanel->addChild(button);