summaryrefslogtreecommitdiff
path: root/indra/llui/lltoolbarview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltoolbarview.cpp')
-rw-r--r--indra/llui/lltoolbarview.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/indra/llui/lltoolbarview.cpp b/indra/llui/lltoolbarview.cpp
index 12247519ad..0996577114 100644
--- a/indra/llui/lltoolbarview.cpp
+++ b/indra/llui/lltoolbarview.cpp
@@ -114,7 +114,7 @@ bool LLToolBarView::addCommand(const LLCommandId& command, LLToolBar* toolbar)
}
bool LLToolBarView::loadToolbars(bool force_default)
-{
+{
LLToolBarView::ToolbarSet toolbar_set;
// Load the toolbars.xml file
@@ -221,19 +221,18 @@ void LLToolBarView::saveToolbars() const
{
// Build the parameter tree from the toolbar data
LLToolBarView::ToolbarSet toolbar_set;
+
+ // *TODO : factorize that code a bit...
if (mToolbarLeft)
{
- toolbar_set.left_toolbar.button_display_mode = (int)(mToolbarLeft->getButtonType());
addToToolset(mToolbarLeft->getCommandsList(),toolbar_set.left_toolbar);
}
if (mToolbarRight)
{
- toolbar_set.right_toolbar.button_display_mode = (int)(mToolbarRight->getButtonType());
addToToolset(mToolbarRight->getCommandsList(),toolbar_set.right_toolbar);
}
if (mToolbarBottom)
{
- toolbar_set.bottom_toolbar.button_display_mode = (int)(mToolbarBottom->getButtonType());
addToToolset(mToolbarBottom->getCommandsList(),toolbar_set.bottom_toolbar);
}
@@ -256,19 +255,6 @@ void LLToolBarView::saveToolbars() const
}
}
-// Enumerate the commands in command_list and add them as Params to the toolbar
-void LLToolBarView::addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const
-{
- for (command_id_list_t::const_iterator it = command_list.begin();
- it != command_list.end();
- ++it)
- {
- LLCommandId::Params command;
- command.name = it->name();
- toolbar.commands.add(command);
- }
-}
-
void LLToolBarView::draw()
{
static bool debug_print = true;