summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfolderview.cpp')
-rw-r--r--indra/newview/llfolderview.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 5aa504eb35..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"
@@ -184,7 +185,6 @@ LLFolderView::LLFolderView(const Params& p)
mSourceID(p.task_id),
mRenameItem( NULL ),
mNeedsScroll( FALSE ),
- mEnableScroll( true ),
mUseLabelSuffix(p.use_label_suffix),
mPinningSelectedItem(FALSE),
mNeedsAutoSelect( FALSE ),
@@ -250,7 +250,7 @@ LLFolderView::LLFolderView(const Params& p)
text_p.name(std::string(p.name));
text_p.font(font);
text_p.visible(false);
- text_p.allow_html(true);
+ text_p.parse_urls(true);
text_p.wrap(true); // allow multiline text. See EXT-7564, EXT-7047
// set text padding the same as in People panel. EXT-7047, EXT-4837
text_p.h_pad(STATUS_TEXT_HPAD);
@@ -1025,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.
@@ -1980,7 +1991,9 @@ void LLFolderView::deleteAllChildren()
void LLFolderView::scrollToShowSelection()
{
- if (mEnableScroll && mSelectedItems.size())
+ // If items are filtered while background fetch is in progress
+ // scrollbar resets to the first filtered item. See EXT-3981.
+ if (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && mSelectedItems.size())
{
mNeedsScroll = TRUE;
}