summaryrefslogtreecommitdiffabout
path: root/kmicromail/composemail.cpp
Unidiff
Diffstat (limited to 'kmicromail/composemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 2dcbc75..f44100b 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -438,66 +438,66 @@ void ComposeMail::accept()
438 while ( it != 0 ) { 438 while ( it != 0 ) {
439 mail->addAttachment( it->getAttachment() ); 439 mail->addAttachment( it->getAttachment() );
440 it = (AttachViewItem *) it->nextSibling(); 440 it = (AttachViewItem *) it->nextSibling();
441 } 441 }
442 442
443 SMTPwrapper wrapper( smtp ); 443 SMTPwrapper wrapper( smtp );
444 if ( wrapper.sendMail( mail,checkBoxLater->isChecked() ) ) 444 if ( wrapper.sendMail( mail,checkBoxLater->isChecked() ) )
445 setStatus( tr ("Mail sent")); 445 setStatus( tr ("Mail sent"));
446 else { 446 else {
447 setStatus( tr ("Error: Something went wrong. Nothing sent")); 447 setStatus( tr ("Error: Something went wrong. Nothing sent"));
448 return; 448 return;
449 } 449 }
450 450
451 451
452 QDialog::accept(); 452 QDialog::accept();
453} 453}
454 454
455void ComposeMail::reject() 455void ComposeMail::reject()
456{ 456{
457 //qDebug("ComposeMail::reject() "); 457 //qDebug("ComposeMail::reject() ");
458 int yesno = QMessageBox::warning(0,i18n("Store message?"), 458 int yesno = QMessageBox::warning(0,i18n("Store message?"),
459 i18n("Store message into drafts?\n"), 459 i18n("Store message into drafts?\n"),
460 i18n("Yes"), 460 i18n("Yes"),
461 i18n("No")); 461 i18n("No"));
462 462
463 //qDebug("button %d ", yesno); 463 //qDebug("button %d ", yesno);
464 if (yesno == 0) { 464 if (yesno == 0) {
465 if ( toLine->text().isEmpty() ) { 465 if ( toLine->text().isEmpty() ) {
466 QMessageBox::warning(0,i18n("Sending mail"), 466 QMessageBox::warning(0,i18n("Sending mail"),
467 i18n("No Receiver spezified" ) ); 467 i18n("No Receiver spezified" ) );
468 return; 468 return;
469 } 469 }
470 saveAsDraft(); 470 saveAsDraft();
471 } 471 }
472 if (yesno == 2) { 472 if (yesno == 2) {
473 qDebug("return "); 473 qDebug("return ");
474 return; 474 return;
475 } 475 }
476 QDialog::reject(); 476 QDialog::reject();
477} 477}
478 478
479ComposeMail::~ComposeMail() 479ComposeMail::~ComposeMail()
480{ 480{
481} 481}
482 482
483void ComposeMail::reEditMail(const RecMailP&current) 483void ComposeMail::reEditMail(const RecMailP&current)
484{ 484{
485 RecMailP data = current; 485 RecMailP data = current;
486 message->setText(QString::fromUtf8( data->Wrapper()->fetchBody(current)->Bodytext().latin1() )); 486 message->setText(data->Wrapper()->fetchBody(current)->Bodytext());
487 subjectLine->setText( QString::fromUtf8( data->getSubject().latin1() )); 487 subjectLine->setText( data->getSubject());
488 toLine->setText(QString::fromUtf8( data->To().join(",").latin1() )); 488 toLine->setText(data->To().join(","));
489 ccLine->setText(QString::fromUtf8( data->CC().join(",").latin1() )); 489 ccLine->setText(data->CC().join(","));
490 bccLine->setText(QString::fromUtf8( data->Bcc().join(",").latin1() )); 490 bccLine->setText(data->Bcc().join(","));
491 replyLine->setText(QString::fromUtf8( data->Replyto().latin1() )); 491 replyLine->setText(data->Replyto());
492} 492}
493 493
494AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) 494AttachViewItem::AttachViewItem( QListView *parent, Attachment *att )
495 : QListViewItem( parent ) 495 : QListViewItem( parent )
496{ 496{
497 attachment = att; 497 attachment = att;
498 if ( !attachment->getPixmap().isNull() ) 498 if ( !attachment->getPixmap().isNull() )
499 setPixmap( 0,attachment->getPixmap() ); 499 setPixmap( 0,attachment->getPixmap() );
500 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); 500 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() );
501 setText( 1, QString::number( att->getSize() ) ); 501 setText( 1, QString::number( att->getSize() ) );
502} 502}
503 503