author | zautrix <zautrix> | 2004-12-13 12:35:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-12-13 12:35:00 (UTC) |
commit | 7ac6c21e832b7d16bd0888d0b66252b6e152005a (patch) (side-by-side diff) | |
tree | c7610e0e25020f19af82ac6257c2debab2638316 /kmicromail/opiemail.cpp | |
parent | 17b25691f0332e648dd1d800e89ccf4e1da8955d (diff) | |
download | kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.zip kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.tar.gz kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.tar.bz2 |
many bugfixes
-rw-r--r-- | kmicromail/opiemail.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index ec192ea..915b3e8 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -301,2 +301,26 @@ void OpieMail::replyMail() } +void OpieMail::closeViewMail(ViewMail * vm) +{ + vm->hide(); +} +void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) +{ + QListViewItem*item = mailView->currentItem(); + if (!item ) { + closeViewMail(vm); + return; + } + RecMailP mail = ((MailListViewItem*)item)->data(); + mail->Wrapper()->deleteMail( mail ); + item = item->itemBelow(); + if (!item ) { + closeViewMail(vm); + return; + } + mailView->setCurrentItem(item); + mail = ((MailListViewItem*)item)->data(); + RecBodyP body = folderView->fetchBody(mail); + vm->setBody( body ); + vm->setMail( mail ); +} void OpieMail::displayNextMail(ViewMail * vm) @@ -305,2 +329,3 @@ void OpieMail::displayNextMail(ViewMail * vm) if (!item) return; + ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); item = item->itemBelow(); @@ -331,2 +356,4 @@ void OpieMail::displayMail() connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) ); + connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) ); + readMail.exec(); |