author | harlekin <harlekin> | 2003-12-14 02:03:25 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-14 02:03:25 (UTC) |
commit | 568f23df5f4d5b1835c3b89ad54eeb6fc53157e6 (patch) (unidiff) | |
tree | 944c4745d4cdb642e873e480b45479d5116ea33a /noncore/net/mail | |
parent | 154e03927d2b97f3f76f807fe104ac9d74035215 (diff) | |
download | opie-568f23df5f4d5b1835c3b89ad54eeb6fc53157e6.zip opie-568f23df5f4d5b1835c3b89ad54eeb6fc53157e6.tar.gz opie-568f23df5f4d5b1835c3b89ad54eeb6fc53157e6.tar.bz2 |
check back before deleting a mail
-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 | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <qheader.h> | 3 | #include <qheader.h> |
4 | #include <qtimer.h> | 4 | #include <qtimer.h> |
5 | #include <qlayout.h> | 5 | #include <qlayout.h> |
6 | #include <qmessagebox.h> | ||
6 | 7 | ||
7 | #include <qpe/qpeapplication.h> | 8 | #include <qpe/qpeapplication.h> |
8 | #include <qpe/resource.h> | 9 | #include <qpe/resource.h> |
@@ -181,8 +182,10 @@ void MainWindow::slotDeleteMail() | |||
181 | { | 182 | { |
182 | if (!mailView->currentItem()) return; | 183 | if (!mailView->currentItem()) return; |
183 | RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); | 184 | RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); |
184 | mail.Wrapper()->deleteMail( mail ); | 185 | 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 ) { |
185 | folderView->refreshCurrent(); | 186 | mail.Wrapper()->deleteMail( mail ); |
187 | folderView->refreshCurrent(); | ||
188 | } | ||
186 | } | 189 | } |
187 | 190 | ||
188 | 191 | ||
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 @@ | |||
1 | #include <qtextbrowser.h> | 1 | #include <qtextbrowser.h> |
2 | #include <qmessagebox.h> | 2 | #include <qmessagebox.h>? |
3 | #include <qtextstream.h> | 3 | #include <qtextstream.h> |
4 | #include <qaction.h> | 4 | #include <qaction.h> |
5 | #include <qpopupmenu.h> | 5 | #include <qpopupmenu.h> |
@@ -319,7 +319,9 @@ void ViewMail::slotForward() | |||
319 | 319 | ||
320 | void ViewMail::slotDeleteMail( ) | 320 | void ViewMail::slotDeleteMail( ) |
321 | { | 321 | { |
322 | m_recMail.Wrapper()->deleteMail( m_recMail ); | 322 | 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 ) { |
323 | hide(); | 323 | m_recMail.Wrapper()->deleteMail( m_recMail ); |
324 | deleted = true; | 324 | hide(); |
325 | deleted = true; | ||
326 | } | ||
325 | } | 327 | } |