summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertoybox.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-11-07 11:15:40 -0800
committerRichard Linden <none@none>2011-11-07 11:15:40 -0800
commit32dca99fe59196fa4a92a815b441b4e6e9f747f0 (patch)
tree6a257d591ad0f241c7fbd42acca72ea79e4c9cf6 /indra/newview/llfloatertoybox.cpp
parent8f47f2222c207938c8fc55158a6fff64ccf1e781 (diff)
parentd6d4bfa02a46c5c7f2e5376b9fad79f2624dda83 (diff)
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/newview/llfloatertoybox.cpp')
-rw-r--r--indra/newview/llfloatertoybox.cpp21
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,