-rw-r--r-- | noncore/net/mail/opiemail.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 61e7dc4..d95b3c9 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp @@ -179,3 +179,3 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) if (!mailView->currentItem()) return; - RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); + MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); /* just the RIGHT button - or hold on pda */ @@ -187,3 +187,3 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) { - if (mail.Wrapper()->getType()==MAILLIB::A_NNTP) { + if (mailtype==MAILLIB::A_NNTP) { m->insertItem(tr("Read this posting"),this,SLOT(displayMail())); @@ -191,2 +191,5 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) } else { + if (folderView->currentisDraft()) { + m->insertItem(tr("Edit this mail"),this,SLOT(reEditMail())); + } m->insertItem(tr("Read this mail"),this,SLOT(displayMail())); @@ -233,4 +236,8 @@ void OpieMail::mailLeftClicked(int button, QListViewItem *item,const QPoint&,int if (!item) return; + if (folderView->currentisDraft()) { + reEditMail(); + } else { displayMail(); } +} @@ -261 +268,11 @@ void OpieMail::slotMoveCopyMail() } + +void OpieMail::reEditMail() +{ + if (!mailView->currentItem()) return; + + ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp ); + compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data()); + compose.slotAdjustColumns(); + QPEApplication::execDialog( &compose ); +} |