diff options
| author | Leslie Linden <leslie@lindenlab.com> | 2011-10-31 15:13:25 -0700 |
|---|---|---|
| committer | Leslie Linden <leslie@lindenlab.com> | 2011-10-31 15:13:25 -0700 |
| commit | 334104ffa91d60d855408eca427da81a0d65908a (patch) | |
| tree | 757638a1b1aea3315d9bd08cb3e37f6347d45a6d /indra/newview/llfloatertoybox.cpp | |
| parent | f01aa16298bf22d9882e8b690f672e20098547a6 (diff) | |
| parent | 727199e22362408f95651f495d6f29ac632e1f02 (diff) | |
Merge from viewer-experience
Diffstat (limited to 'indra/newview/llfloatertoybox.cpp')
| -rw-r--r-- | indra/newview/llfloatertoybox.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index f527937e8f..324afe661f 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -42,6 +42,7 @@ LLFloaterToybox::LLFloaterToybox(const LLSD& key) , mToolBar(NULL) { mCommitCallbackRegistrar.add("Toybox.RestoreDefaults", boost::bind(&LLFloaterToybox::onBtnRestoreDefaults, this)); + mCommitCallbackRegistrar.add("Toybox.ClearAll", boost::bind(&LLFloaterToybox::onBtnClearAll, this)); } LLFloaterToybox::~LLFloaterToybox() @@ -121,15 +122,35 @@ static bool finish_restore_toybox(const LLSD& notification, const LLSD& response { LLToolBarView::loadDefaultToolbars(); } + return false; } + +static bool finish_clear_all_toybox(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (option == 0) + { + LLToolBarView::clearAllToolbars(); + } + + return false; +} + static LLNotificationFunctorRegistration finish_restore_toybox_reg("ConfirmRestoreToybox", finish_restore_toybox); +static LLNotificationFunctorRegistration finish_clear_all_toybox_reg("ConfirmClearAllToybox", finish_clear_all_toybox); void LLFloaterToybox::onBtnRestoreDefaults() { LLNotificationsUtil::add("ConfirmRestoreToybox"); } +void LLFloaterToybox::onBtnClearAll() +{ + LLNotificationsUtil::add("ConfirmClearAllToybox"); +} + BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, |
