Version: v0.8.3 (using KDE 3.2 BRANCH >= 20040204, Mandrake Linux Cooker i586 - Cooker) Compiler: gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk) OS: Linux (i686) release 2.6.3-7mdk i just deleted two almost complete and very large downloads by accidently clicking the trash can icon. ARGH!!! a confirmation dialog would be nice. because this isn't just a feature but a MUST i consider this a bug report.
*** Bug 93576 has been marked as a duplicate of this bug. ***
SVN commit 439190 by uwolfer: BUG: 88820 Confirmation dialog for delete files from individual window. M +23 -16 transfer.cpp --- trunk/KDE/kdenetwork/kget/transfer.cpp #439189:439190 @@ -33,6 +33,7 @@ #include <kiconloader.h> #include <kstandarddirs.h> #include <kwin.h> +#include <kmessagebox.h> #include <assert.h> #include "safedelete.h" @@ -451,27 +452,33 @@ void Transfer::slotRequestRemove() { sDebugIn << endl; - m_paDelete->setEnabled(false); - m_paPause->setEnabled(false); - if(dlgIndividual) - dlgIndividual->close(); + if (KMessageBox::warningContinueCancel(0, i18n("Are you sure you want to delete this transfer?"), + i18n("Question"), KStdGuiItem::del(), + QString("delete_transfer")) + == KMessageBox::Continue) + { + m_paDelete->setEnabled(false); + m_paPause->setEnabled(false); + if(dlgIndividual) + dlgIndividual->close(); - if ( status != ST_FINISHED ) - { - KURL file = dest; - // delete the partly downloaded file, if any - file.setFileName( dest.fileName() + ".part" ); // ### get it from the job? + if ( status != ST_FINISHED ) + { + KURL file = dest; + // delete the partly downloaded file, if any + file.setFileName( dest.fileName() + ".part" ); // ### get it from the job? - if ( KIO::NetAccess::exists( file, false, view ) ) // don't pollute user with warnings - { - SafeDelete::deleteFile( file ); // ### messagebox on failure? + if ( KIO::NetAccess::exists( file, false, view ) ) // don't pollute user with warnings + { + SafeDelete::deleteFile( file ); // ### messagebox on failure? + } } + if (status == ST_RUNNING) + m_pSlave->Op(Slave::REMOVE); + else + emit statusChanged(this, OP_REMOVED); } - if (status == ST_RUNNING) - m_pSlave->Op(Slave::REMOVE); - else - emit statusChanged(this, OP_REMOVED); sDebugOut << endl; }