From 568f23df5f4d5b1835c3b89ad54eeb6fc53157e6 Mon Sep 17 00:00:00 2001 From: harlekin Date: Sun, 14 Dec 2003 02:03:25 +0000 Subject: check back before deleting a mail --- diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index 391b55e..e466d9b 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -181,8 +182,10 @@ void MainWindow::slotDeleteMail() { if (!mailView->currentItem()) return; RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); - mail.Wrapper()->deleteMail( mail ); - folderView->refreshCurrent(); + if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("

Do you really want to delete this mail?

" ) + mail.getFrom() + " - " + mail.getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { + mail.Wrapper()->deleteMail( mail ); + folderView->refreshCurrent(); + } } diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index 163ffb7..2415c82 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp @@ -1,5 +1,5 @@ #include -#include +#include ? #include #include #include @@ -319,7 +319,9 @@ void ViewMail::slotForward() void ViewMail::slotDeleteMail( ) { - m_recMail.Wrapper()->deleteMail( m_recMail ); - hide(); - deleted = true; + if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("

Do you really want to delete this mail?

" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { + m_recMail.Wrapper()->deleteMail( m_recMail ); + hide(); + deleted = true; + } } -- cgit v0.9.0.2