summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
authorAndrew Dyukov <adyukov@productengine.com>2010-08-10 19:16:18 +0300
committerAndrew Dyukov <adyukov@productengine.com>2010-08-10 19:16:18 +0300
commit79be630d0830a50c7c40bf8a787ccbeced82caf4 (patch)
tree42128d07b9d9298c2546e44a0ba87f929805c3e8 /indra/newview/llfolderview.cpp
parentf88890afe5fa45e25f196a2546620102935887aa (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.cpp12
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.