Added a confirmation dialog.
authorMikko Keinänen <mikko.keinanen@gmail.com>
Mon, 15 Nov 2010 22:01:17 +0000 (00:01 +0200)
committerMikko Keinänen <mikko.keinanen@gmail.com>
Mon, 15 Nov 2010 22:01:17 +0000 (00:01 +0200)
src/dialogs/mediaimagepathmaindialog.cpp

index ff31fc6..89e281d 100644 (file)
@@ -61,6 +61,14 @@ void MediaImagePathMainDialog::beginScanFilePath()
 {
     QModelIndex index = objectList->currentIndex();
     if (!index.isValid()) return;
+    if (QMessageBox::question(this,
+        tr("Confirm"),
+        tr("Do you want to continue? "
+        "If you have tons of huge files this may take even hours! "
+        "If you are low on battery power, consider carefully!"),
+        QMessageBox::Yes, QMessageBox::No, QMessageBox::NoButton ) == QMessageBox::No) {
+            return;
+        }
     FileUtil fileUtil(this);
     EmuFrontObject *ob = dbManager->getDataObjectFromModel(&index);
     if (!ob) return;