From a3836842bfabc973f27f2686320f7a207c59b10a Mon Sep 17 00:00:00 2001 From: alwin Date: Mon, 08 Mar 2004 03:05:23 +0000 Subject: different context menus for mail and nntp messages --- (limited to 'noncore') diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index d8b58b6..61e7dc4 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp @@ -176,6 +176,8 @@ void OpieMail::slotDeleteMail() void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) { + if (!mailView->currentItem()) return; + RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); /* just the RIGHT button - or hold on pda */ if (button!=2) {return;} qDebug("Event right/hold"); @@ -183,9 +185,14 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) QPopupMenu *m = new QPopupMenu(0); if (m) { - m->insertItem(tr("Read this mail"),this,SLOT(displayMail())); - m->insertItem(tr("Delete this mail"),this,SLOT(slotDeleteMail())); - m->insertItem(tr("Copy/Move this mail"),this,SLOT(slotMoveCopyMail())); + if (mail.Wrapper()->getType()==MAILLIB::A_NNTP) { + m->insertItem(tr("Read this posting"),this,SLOT(displayMail())); +// m->insertItem(tr("Copy this posting"),this,SLOT(slotMoveCopyMail())); + } else { + m->insertItem(tr("Read this mail"),this,SLOT(displayMail())); + m->insertItem(tr("Delete this mail"),this,SLOT(slotDeleteMail())); + m->insertItem(tr("Copy/Move this mail"),this,SLOT(slotMoveCopyMail())); + } m->setFocus(); m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); delete m; -- cgit v0.9.0.2