]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Ask before opening more than 5 items.
authorChirag Anand <anand.chirag@gmail.com>
Tue, 10 Jul 2012 18:43:53 +0000 (00:13 +0530)
committerChirag Anand <anand.chirag@gmail.com>
Tue, 10 Jul 2012 18:43:53 +0000 (00:13 +0530)
Thanks to A JANARDHAN REDDY for the patch.
CCBUG: 54990
CCMAIL: annapareddyjanardhanreddy@gmail.com

src/views/dolphinview.cpp

index 7cfb3fc41d258ef5af451c15eec26f8cb990b205..233c7007a3f0c62f4d0e59fb4f5feb774fc57c43 100644 (file)
@@ -767,6 +767,14 @@ void DolphinView::slotItemsActivated(const QSet<int>& 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());