-rw-r--r-- | kmicromail/opiemail.cpp | 9 | ||||
-rw-r--r-- | kmicromail/opiemail.h | 1 |
2 files changed, 10 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 @@ -485,16 +485,24 @@ void OpieMail::slotDeleteAllMail() } 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; @@ -515,16 +523,17 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) 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; } } diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index 48c5dda..bdd9058 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h @@ -46,16 +46,17 @@ protected slots: virtual void mailHold(int, QListViewItem *,const QPoint&,int); virtual void slotShowFolders( bool show ); virtual void refreshMailView(const QValueList<RecMailP>&); virtual void mailLeftClicked( QListViewItem * ); virtual void slotMoveCopyMail(); virtual void slotMoveCopyAllMail(); virtual void reEditMail(); void clearSelection(); + void selectAll(); void slotDownloadMail(); private: ComposeMail* mCurrentComposer; void closeViewMail(ViewMail * vm); QString mPendingEmail; QString mPendingName; QByteArray mPendingData; QCString mPendingMessage; |