diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2010-08-10 19:16:18 +0300 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2010-08-10 19:16:18 +0300 |
commit | 4b8d41214bb4c3a13050956fcf6f4aaee571e52a (patch) | |
tree | 42128d07b9d9298c2546e44a0ba87f929805c3e8 /indra/newview/llfolderview.cpp | |
parent | 8db6d855ec552657a6390f93af1f29d96b819bde (diff) |
EXT-8255 FIXED Added confirmation dialog when removing items.
Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/849/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llfolderview.cpp')
-rw-r--r-- | indra/newview/llfolderview.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index e8891d1cc5..ab36a76153 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -62,6 +62,7 @@ #include "llviewerwindow.h" #include "llvoavatar.h" #include "llfloaterproperties.h" +#include "llnotificationsutil.h" // Linden library includes #include "lldbstrings.h" @@ -1024,6 +1025,17 @@ void LLFolderView::closeRenamer( void ) void LLFolderView::removeSelectedItems( void ) { + if (mSelectedItems.empty()) return; + LLSD args; + args["QUESTION"] = LLTrans::getString(mSelectedItems.size() > 1 ? "DeleteItems" : "DeleteItem"); + LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLFolderView::onItemsRemovalConfirmation, this, _1, _2)); +} + +void LLFolderView::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) return; // canceled + if(getVisible() && getEnabled()) { // just in case we're removing the renaming item. |