-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 7 | ||||
-rw-r--r-- | noncore/net/mail/viewmail.cpp | 10 |
2 files changed, 11 insertions, 6 deletions
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 @@ -5,2 +5,3 @@ #include <qlayout.h> +#include <qmessagebox.h> @@ -183,4 +184,6 @@ void MainWindow::slotDeleteMail() RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); - mail.Wrapper()->deleteMail( mail ); - folderView->refreshCurrent(); + if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + 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,3 +1,3 @@ #include <qtextbrowser.h> -#include <qmessagebox.h> +#include <qmessagebox.h>? #include <qtextstream.h> @@ -321,5 +321,7 @@ void ViewMail::slotDeleteMail( ) { - m_recMail.Wrapper()->deleteMail( m_recMail ); - hide(); - deleted = true; + if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { + m_recMail.Wrapper()->deleteMail( m_recMail ); + hide(); + deleted = true; + } } |