-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 | |||
@@ -286,46 +286,62 @@ void OpieMail::replyMail() | |||
286 | if (mail->Replyto().isEmpty()) { | 286 | if (mail->Replyto().isEmpty()) { |
287 | composer.setTo( mail->getFrom()); | 287 | composer.setTo( mail->getFrom()); |
288 | } else { | 288 | } else { |
289 | composer.setTo( mail->Replyto()); | 289 | composer.setTo( mail->Replyto()); |
290 | } | 290 | } |
291 | composer.setSubject( prefix + mail->getSubject()); | 291 | composer.setSubject( prefix + mail->getSubject()); |
292 | composer.setMessage( rtext ); | 292 | composer.setMessage( rtext ); |
293 | composer.setInReplyTo( mail->Msgid()); | 293 | composer.setInReplyTo( mail->Msgid()); |
294 | composer.setCharset( body->getCharset() ); | 294 | composer.setCharset( body->getCharset() ); |
295 | if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) | 295 | if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) |
296 | { | 296 | { |
297 | mail->Wrapper()->answeredMail(mail); | 297 | mail->Wrapper()->answeredMail(mail); |
298 | } | 298 | } |
299 | delete settings; | 299 | delete settings; |
300 | 300 | ||
301 | } | 301 | } |
302 | void OpieMail::displayNextMail(ViewMail * vm) | ||
303 | { | ||
304 | QListViewItem*item = mailView->currentItem(); | ||
305 | if (!item) return; | ||
306 | item = item->itemBelow(); | ||
307 | if (!item) { | ||
308 | vm->setCaption(i18n("End of List" )); | ||
309 | return; | ||
310 | } | ||
311 | mailView->setCurrentItem(item); | ||
312 | RecMailP mail = ((MailListViewItem*)item)->data(); | ||
313 | RecBodyP body = folderView->fetchBody(mail); | ||
314 | vm->setBody( body ); | ||
315 | vm->setMail( mail ); | ||
316 | } | ||
302 | void OpieMail::displayMail() | 317 | void OpieMail::displayMail() |
303 | { | 318 | { |
304 | QListViewItem*item = mailView->currentItem(); | 319 | QListViewItem*item = mailView->currentItem(); |
305 | if (!item) return; | 320 | if (!item) return; |
306 | RecMailP mail = ((MailListViewItem*)item)->data(); | 321 | RecMailP mail = ((MailListViewItem*)item)->data(); |
307 | RecBodyP body = folderView->fetchBody(mail); | 322 | RecBodyP body = folderView->fetchBody(mail); |
308 | ViewMail readMail( this,"", Qt::WType_Modal ); | 323 | ViewMail readMail( this,"", Qt::WType_Modal ); |
309 | readMail.setBody( body ); | 324 | readMail.setBody( body ); |
310 | readMail.setMail( mail ); | 325 | readMail.setMail( mail ); |
311 | #ifndef DESKTOP_VERSION | 326 | #ifndef DESKTOP_VERSION |
312 | readMail.showMaximized(); | 327 | readMail.showMaximized(); |
313 | #else | 328 | #else |
314 | readMail.resize( 640, 480); | 329 | readMail.resize( 640, 480); |
315 | #endif | 330 | #endif |
331 | connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) ); | ||
316 | readMail.exec(); | 332 | readMail.exec(); |
317 | 333 | ||
318 | if ( readMail.deleted ) | 334 | if ( readMail.deleted ) |
319 | { | 335 | { |
320 | folderView->refreshCurrent(); | 336 | folderView->refreshCurrent(); |
321 | } | 337 | } |
322 | else | 338 | else |
323 | { | 339 | { |
324 | ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); | 340 | ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); |
325 | } | 341 | } |
326 | } | 342 | } |
327 | void OpieMail::slotGetAllMail() | 343 | void OpieMail::slotGetAllMail() |
328 | { | 344 | { |
329 | QListViewItem * item = folderView->firstChild(); | 345 | QListViewItem * item = folderView->firstChild(); |
330 | while ( item ){ | 346 | while ( item ){ |
331 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); | 347 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); |