EXP-1205 PROGRESS -- As a User, I want a toybox which will contain all buttons that I can d&d into the toolbars
EXP-1268 FIX -- The "Restore Defaults" button should reset the left/right/bottom toolbars to their default states * LLToolBarView::loadDefaultToolbars now a static function * Toybox button callback hooked up to properly restore defaults Reviewed by Merovmeow-7.2.2
parent
ccd619013d
commit
cdc80b1dd3
|
|
@ -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
|
||||
|
|
@ -204,6 +204,19 @@ bool LLToolBarView::loadToolbars(bool force_default)
|
|||
return true;
|
||||
}
|
||||
|
||||
//static
|
||||
bool LLToolBarView::loadDefaultToolbars()
|
||||
{
|
||||
bool retval = false;
|
||||
|
||||
if (gToolBarView)
|
||||
{
|
||||
retval = gToolBarView->loadToolbars(true);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
void LLToolBarView::saveToolbars() const
|
||||
{
|
||||
// Build the parameter tree from the toolbar data
|
||||
|
|
|
|||
|
|
@ -72,7 +72,8 @@ public:
|
|||
bool hasCommand(const LLCommandId& commandId) const;
|
||||
// Loads the toolbars from the existing user or default settings
|
||||
bool loadToolbars(bool force_default = false); // return false if load fails
|
||||
bool loadDefaultToolbars() { return loadToolbars(true); }
|
||||
|
||||
static bool loadDefaultToolbars();
|
||||
|
||||
protected:
|
||||
friend class LLUICtrlFactory;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ BOOL LLFloaterToybox::postBuild()
|
|||
center();
|
||||
|
||||
mBtnRestoreDefaults = getChild<LLButton>("btn_restore_defaults");
|
||||
mBtnRestoreDefaults->setCommitCallback(boost::bind(&LLToolBarView::loadDefaultToolbars));
|
||||
|
||||
mToolBar = getChild<LLToolBar>("toybox_toolbar");
|
||||
|
||||
LLCommandManager& cmdMgr = LLCommandManager::instance();
|
||||
|
|
|
|||
Loading…
Reference in New Issue