From cc03c5514c5f917e180c2fcb6b6b3ce991c774f8 Mon Sep 17 00:00:00 2001 From: Chirag Anand Date: Wed, 11 Jul 2012 00:13:53 +0530 Subject: [PATCH] Ask before opening more than 5 items. Thanks to A JANARDHAN REDDY for the patch. CCBUG: 54990 CCMAIL: annapareddyjanardhanreddy@gmail.com --- src/views/dolphinview.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 7cfb3fc41..233c7007a 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -767,6 +767,14 @@ void DolphinView::slotItemsActivated(const QSet& indexes) items.append(m_model->fileItem(index)); } + if (items.count() > 5) { + QString question = QString("Are you sure you want to open %1 items?").arg(items.count()); + const int answer = KMessageBox::warningYesNo(this, question); + if (answer != KMessageBox::Yes) { + return; + } + } + foreach (const KFileItem& item, items) { if (item.isDir()) { emit tabRequested(item.url()); -- 2.47.3