Commit 7a114644 authored by Alex Neundorf's avatar Alex Neundorf

- ask user for confirmation when dropping a directory

When dropping a directory into kate, now there is a messagebox which asks
the user whether he really wants to load all files contained in that
directory. To me this usually happened accidentially and basically killed kate
(because it started to load hundreds of files).

parent 32c9788b
......@@ -708,9 +708,14 @@ void KateMainWindow::slotDropEvent(QDropEvent *event)
KFileItem kitem(url);
if (kitem.isDir()) {
if (KMessageBox::questionYesNo(this,
i18n("You dropped the directory %1 into Kate. "
"Do you want to load all files contained in it ?", url.url()),
i18n("Load files recursively?")) == KMessageBox::Yes) {
KIO::ListJob *list_job = KIO::listRecursive(url, KIO::DefaultFlags, false);
connect(list_job, SIGNAL(entries(KIO::Job*,KIO::UDSEntryList)),
this, SLOT(slotListRecursiveEntries(KIO::Job*,KIO::UDSEntryList)));
} else {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment