diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-11 13:44:03 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-11 13:44:03 +0100 |
commit | 2ab6776dc707b7c7dccb2dff41c0a1dd647aeb37 (patch) | |
tree | a73e95c2c9ebb8a75b087aa0a2594de98d99992a /indra/newview/llfolderview.cpp | |
parent | b01bd4d8494e372b645f50c6fd2ace75a5293587 (diff) | |
parent | 4b8d41214bb4c3a13050956fcf6f4aaee571e52a (diff) |
merge from PE's viewer-trunk
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. |