From: Chirag Anand Date: Tue, 10 Jul 2012 18:43:53 +0000 (+0530) Subject: Ask before opening more than 5 items. X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/cc03c5514c5f917e180c2fcb6b6b3ce991c774f8 Ask before opening more than 5 items. Thanks to A JANARDHAN REDDY for the patch. CCBUG: 54990 CCMAIL: annapareddyjanardhanreddy@gmail.com --- 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());