-rw-r--r-- | kmicromail/opiemail.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 8ac3451..e296d9c 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -481,24 +481,32 @@ void OpieMail::slotDeleteAllMail() return; RecMailP mail = t.first(); mail->Wrapper()->deleteMailList(t); folderView->refreshCurrent(); } void OpieMail::clearSelection() { mailView->clearSelection(); } +void OpieMail::selectAll() +{ + QListViewItem* item = mailView->firstChild (); + while ( item ) { + mailView->setSelected ( item, true ); + item = item->nextSibling(); + } +} void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) { if (!mailView->currentItem()) return; MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); /* just the RIGHT button - or hold on pda */ if (button!=2) {return;} if (!item) return; QPopupMenu *m = new QPopupMenu(0); if (m) { if (mailtype==MAILLIB::A_NNTP) { @@ -511,24 +519,25 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) if (folderView->currentisDraft()) { m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); } m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); m->insertSeparator(); m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); m->insertSeparator(); m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); m->insertSeparator(); + m->insertItem(i18n("Select all"),this,SLOT(selectAll())); m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); } m->setFocus(); m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); delete m; } } void OpieMail::slotShowFolders( bool show ) { if ( show && folderView->isHidden() ) { |