diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatertoybox.cpp | 17 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 14 |
2 files changed, 29 insertions, 2 deletions
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index 84881655f8..b4c9894271 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -30,12 +30,13 @@ #include "llbutton.h" #include "llcommandmanager.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llpanel.h" #include "lltoolbar.h" #include "lltoolbarview.h" #include "lltrans.h" - LLFloaterToybox::LLFloaterToybox(const LLSD& key) : LLFloater(key) , mBtnRestoreDefaults(NULL) @@ -113,9 +114,21 @@ void LLFloaterToybox::draw() LLFloater::draw(); } +static bool finish_restore_toybox(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (option == 0) + { + LLToolBarView::loadDefaultToolbars(); + } + return false; +} +static LLNotificationFunctorRegistration finish_restore_toybox_reg("ConfirmRestoreToybox", finish_restore_toybox); + void LLFloaterToybox::onBtnRestoreDefaults() { - LLToolBarView::loadDefaultToolbars(); + LLNotificationsUtil::add("ConfirmRestoreToybox"); } BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 6b0ffd9d33..f510b3c5ba 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4624,6 +4624,20 @@ Are you sure you want to quit? <notification icon="alertmodal.tga" + name="ConfirmRestoreToybox" + type="alertmodal"> + <unique/> +Are you sure you want to restore your default buttons and toolbars? + +You cannot undo this action. + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" name="DeleteItems" type="alertmodal"> <unique/> |