summaryrefslogtreecommitdiff
path: root/noncore/net/mail/opiemail.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/opiemail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/opiemail.cpp21
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
@@ -178,5 +178,5 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
178{ 178{
179 if (!mailView->currentItem()) return; 179 if (!mailView->currentItem()) return;
180 RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); 180 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType();
181 /* just the RIGHT button - or hold on pda */ 181 /* just the RIGHT button - or hold on pda */
182 if (button!=2) {return;} 182 if (button!=2) {return;}
@@ -186,8 +186,11 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
186 if (m) 186 if (m)
187 { 187 {
188 if (mail.Wrapper()->getType()==MAILLIB::A_NNTP) { 188 if (mailtype==MAILLIB::A_NNTP) {
189 m->insertItem(tr("Read this posting"),this,SLOT(displayMail())); 189 m->insertItem(tr("Read this posting"),this,SLOT(displayMail()));
190// m->insertItem(tr("Copy this posting"),this,SLOT(slotMoveCopyMail())); 190// m->insertItem(tr("Copy this posting"),this,SLOT(slotMoveCopyMail()));
191 } else { 191 } else {
192 if (folderView->currentisDraft()) {
193 m->insertItem(tr("Edit this mail"),this,SLOT(reEditMail()));
194 }
192 m->insertItem(tr("Read this mail"),this,SLOT(displayMail())); 195 m->insertItem(tr("Read this mail"),this,SLOT(displayMail()));
193 m->insertItem(tr("Delete this mail"),this,SLOT(slotDeleteMail())); 196 m->insertItem(tr("Delete this mail"),this,SLOT(slotDeleteMail()));
@@ -232,6 +235,10 @@ void OpieMail::mailLeftClicked(int button, QListViewItem *item,const QPoint&,int
232 if (button!=1) return; 235 if (button!=1) return;
233 if (!item) return; 236 if (!item) return;
237 if (folderView->currentisDraft()) {
238 reEditMail();
239 } else {
234 displayMail(); 240 displayMail();
235} 241}
242}
236 243
237void OpieMail::slotMoveCopyMail() 244void OpieMail::slotMoveCopyMail()
@@ -260,2 +267,12 @@ void OpieMail::slotMoveCopyMail()
260 folderView->refreshCurrent(); 267 folderView->refreshCurrent();
261} 268}
269
270void OpieMail::reEditMail()
271{
272 if (!mailView->currentItem()) return;
273
274 ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp );
275 compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data());
276 compose.slotAdjustColumns();
277 QPEApplication::execDialog( &compose );
278}