-rw-r--r-- | kmicromail/opiemail.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index c20c7ce..ec192ea 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -294,30 +294,46 @@ void OpieMail::replyMail() composer.setCharset( body->getCharset() ); if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) { mail->Wrapper()->answeredMail(mail); } delete settings; } +void OpieMail::displayNextMail(ViewMail * vm) +{ + QListViewItem*item = mailView->currentItem(); + if (!item) return; + item = item->itemBelow(); + if (!item) { + vm->setCaption(i18n("End of List" )); + return; + } + mailView->setCurrentItem(item); + RecMailP mail = ((MailListViewItem*)item)->data(); + RecBodyP body = folderView->fetchBody(mail); + vm->setBody( body ); + vm->setMail( mail ); +} void OpieMail::displayMail() { QListViewItem*item = mailView->currentItem(); if (!item) return; RecMailP mail = ((MailListViewItem*)item)->data(); RecBodyP body = folderView->fetchBody(mail); ViewMail readMail( this,"", Qt::WType_Modal ); readMail.setBody( body ); readMail.setMail( mail ); #ifndef DESKTOP_VERSION readMail.showMaximized(); #else readMail.resize( 640, 480); #endif + connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) ); readMail.exec(); if ( readMail.deleted ) { folderView->refreshCurrent(); } else { |