Folder %1 is not empty.
Skip this one "
+ "or delete all?
",
+ fileName),
+ QString(), KGuiItem(i18n("&Skip")), KGuiItem(i18n("&Delete All")));
+ if (result == KMessageBox::Yes) {
+ fileNames.removeAll(fileName); // skip
+ } else if (result == KMessageBox::No) {
+ break; // accept all remaining
+ } else {
+ return; // cancel
+ }
}
}
}
- ++name;
}
if (fileNames.count() == 0)
- return ; // nothing to delete
+ return; // nothing to delete
// after the delete return the cursor to the first unmarked
// file above the current item;
panel->prepareToDelete();
// let the vfs do the job...
- files()->deleteFiles(fileNames, reallyDelete);
+ files()->deleteFiles(fileNames, moveToTrash);
+}
+
+void ListPanelFunc::removeVirtualFiles()
+{
+ if (files()->type() != vfs::VFS_VIRT) {
+ krOut << "filesystem not virtual";
+ return;
+ }
+
+ const QStringList fileNames = panel->getSelectedNames();
+ if (fileNames.isEmpty())
+ return;
+
+ const QString text =
+ i18np("Do you really want to delete this virtual item (physical files stay untouched)?",
+ "Do you really want to delete these %1 virtual items (physical files stay "
+ "untouched)?",
+ fileNames.count());
+ if (KMessageBox::warningContinueCancelList(krMainWindow, text, fileNames, i18n("Warning"),
+ KStandardGuiItem::remove()) != KMessageBox::Continue)
+ return;
+
+ virt_vfs *vfs = static_cast