author | zautrix <zautrix> | 2005-01-28 03:22:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-28 03:22:17 (UTC) |
commit | 94f0e8140c07696174dc3774dc2c11efad2ffa68 (patch) (unidiff) | |
tree | d95cc80e5c5221e8d9ce1cbf4b01cbf78fdf843a /kmicromail/opiemail.cpp | |
parent | 6fb044008531ec883fc25a3ef2b43904930cfff6 (diff) | |
download | kdepimpi-94f0e8140c07696174dc3774dc2c11efad2ffa68.zip kdepimpi-94f0e8140c07696174dc3774dc2c11efad2ffa68.tar.gz kdepimpi-94f0e8140c07696174dc3774dc2c11efad2ffa68.tar.bz2 |
missing config
-rw-r--r-- | kmicromail/opiemail.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 68f0eb3..f56711d 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -450,103 +450,104 @@ void OpieMail::slotDeleteAllMail() | |||
450 | QValueList<RecMailP> t; | 450 | QValueList<RecMailP> t; |
451 | if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) | 451 | if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) |
452 | { | 452 | { |
453 | MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); | 453 | MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); |
454 | while ( item ) { | 454 | while ( item ) { |
455 | if ( item->isSelected() ) { | 455 | if ( item->isSelected() ) { |
456 | t.append( item->data() ); | 456 | t.append( item->data() ); |
457 | } | 457 | } |
458 | item = (MailListViewItem*)item->nextSibling(); | 458 | item = (MailListViewItem*)item->nextSibling(); |
459 | } | 459 | } |
460 | } | 460 | } |
461 | else | 461 | else |
462 | return; | 462 | return; |
463 | if ( t.count() == 0 ) | 463 | if ( t.count() == 0 ) |
464 | return; | 464 | return; |
465 | RecMailP mail = t.first(); | 465 | RecMailP mail = t.first(); |
466 | mail->Wrapper()->deleteMailList(t); | 466 | mail->Wrapper()->deleteMailList(t); |
467 | folderView->refreshCurrent(); | 467 | folderView->refreshCurrent(); |
468 | 468 | ||
469 | 469 | ||
470 | } | 470 | } |
471 | void OpieMail::clearSelection() | 471 | void OpieMail::clearSelection() |
472 | { | 472 | { |
473 | mailView->clearSelection(); | 473 | mailView->clearSelection(); |
474 | 474 | ||
475 | } | 475 | } |
476 | 476 | ||
477 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) | 477 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) |
478 | { | 478 | { |
479 | if (!mailView->currentItem()) return; | 479 | if (!mailView->currentItem()) return; |
480 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); | 480 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); |
481 | /* just the RIGHT button - or hold on pda */ | 481 | /* just the RIGHT button - or hold on pda */ |
482 | if (button!=2) {return;} | 482 | if (button!=2) {return;} |
483 | if (!item) return; | 483 | if (!item) return; |
484 | QPopupMenu *m = new QPopupMenu(0); | 484 | QPopupMenu *m = new QPopupMenu(0); |
485 | if (m) | 485 | if (m) |
486 | { | 486 | { |
487 | if (mailtype==MAILLIB::A_NNTP) { | 487 | if (mailtype==MAILLIB::A_NNTP) { |
488 | m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); | 488 | m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); |
489 | m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); | 489 | m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); |
490 | m->insertSeparator(); | 490 | m->insertSeparator(); |
491 | m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); | 491 | m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); |
492 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); | 492 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); |
493 | } else { | 493 | } else { |
494 | if (folderView->currentisDraft()) { | 494 | if (folderView->currentisDraft()) { |
495 | m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); | 495 | m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); |
496 | } | 496 | } |
497 | m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); | 497 | m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); |
498 | m->insertSeparator(); | ||
499 | m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); | 498 | m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); |
499 | m->insertSeparator(); | ||
500 | m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); | 500 | m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); |
501 | m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); | 501 | m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); |
502 | m->insertSeparator(); | 502 | m->insertSeparator(); |
503 | m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); | 503 | m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); |
504 | m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); | 504 | m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); |
505 | m->insertSeparator(); | ||
505 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); | 506 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); |
506 | } | 507 | } |
507 | m->setFocus(); | 508 | m->setFocus(); |
508 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); | 509 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); |
509 | delete m; | 510 | delete m; |
510 | } | 511 | } |
511 | } | 512 | } |
512 | 513 | ||
513 | void OpieMail::slotShowFolders( bool show ) | 514 | void OpieMail::slotShowFolders( bool show ) |
514 | { | 515 | { |
515 | if ( show && folderView->isHidden() ) | 516 | if ( show && folderView->isHidden() ) |
516 | { | 517 | { |
517 | folderView->show(); | 518 | folderView->show(); |
518 | } | 519 | } |
519 | else if ( !show && !folderView->isHidden() ) | 520 | else if ( !show && !folderView->isHidden() ) |
520 | { | 521 | { |
521 | folderView->hide(); | 522 | folderView->hide(); |
522 | } | 523 | } |
523 | } | 524 | } |
524 | 525 | ||
525 | void OpieMail::refreshMailView(const QValueList<RecMailP>&list) | 526 | void OpieMail::refreshMailView(const QValueList<RecMailP>&list) |
526 | { | 527 | { |
527 | MailListViewItem*item = 0; | 528 | MailListViewItem*item = 0; |
528 | mailView->clear(); | 529 | mailView->clear(); |
529 | 530 | ||
530 | QValueList<RecMailP>::ConstIterator it; | 531 | QValueList<RecMailP>::ConstIterator it; |
531 | for (it = list.begin(); it != list.end();++it) | 532 | for (it = list.begin(); it != list.end();++it) |
532 | { | 533 | { |
533 | item = new MailListViewItem(mailView,item); | 534 | item = new MailListViewItem(mailView,item); |
534 | item->storeData((*it)); | 535 | item->storeData((*it)); |
535 | item->showEntry(); | 536 | item->showEntry(); |
536 | } | 537 | } |
537 | mailView->setSorting ( 4, false ); | 538 | mailView->setSorting ( 4, false ); |
538 | } | 539 | } |
539 | 540 | ||
540 | void OpieMail::mailLeftClicked( QListViewItem *item ) | 541 | void OpieMail::mailLeftClicked( QListViewItem *item ) |
541 | { | 542 | { |
542 | mailView->clearSelection(); | 543 | mailView->clearSelection(); |
543 | /* just LEFT button - or tap with stylus on pda */ | 544 | /* just LEFT button - or tap with stylus on pda */ |
544 | //if (button!=1) return; | 545 | //if (button!=1) return; |
545 | if (!item) return; | 546 | if (!item) return; |
546 | if (folderView->currentisDraft()) { | 547 | if (folderView->currentisDraft()) { |
547 | reEditMail(); | 548 | reEditMail(); |
548 | } else { | 549 | } else { |
549 | displayMail(); | 550 | displayMail(); |
550 | } | 551 | } |
551 | } | 552 | } |
552 | 553 | ||