-rw-r--r-- | kmicromail/composemail.cpp | 12 |
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 | |||
@@ -422,82 +422,82 @@ void ComposeMail::accept() | |||
422 | mail->setCC( ccLine->text().utf8 () ); | 422 | mail->setCC( ccLine->text().utf8 () ); |
423 | mail->setBCC( bccLine->text().utf8 () ); | 423 | mail->setBCC( bccLine->text().utf8 () ); |
424 | mail->setReply( replyLine->text().utf8 () ); | 424 | mail->setReply( replyLine->text().utf8 () ); |
425 | mail->setSubject( subjectLine->text().utf8 () ); | 425 | mail->setSubject( subjectLine->text().utf8 () ); |
426 | if (!m_replyid.isEmpty()) { | 426 | if (!m_replyid.isEmpty()) { |
427 | QStringList ids; | 427 | QStringList ids; |
428 | ids.append(m_replyid.utf8 ()); | 428 | ids.append(m_replyid.utf8 ()); |
429 | mail->setInreply(ids); | 429 | mail->setInreply(ids); |
430 | } | 430 | } |
431 | QString txt = message->text().utf8 (); | 431 | QString txt = message->text().utf8 (); |
432 | if ( !sigMultiLine->text().isEmpty() ) { | 432 | if ( !sigMultiLine->text().isEmpty() ) { |
433 | txt.append( "\n--\n" ); | 433 | txt.append( "\n--\n" ); |
434 | txt.append( sigMultiLine->text().utf8 () ); | 434 | txt.append( sigMultiLine->text().utf8 () ); |
435 | } | 435 | } |
436 | mail->setMessage( txt ); | 436 | mail->setMessage( txt ); |
437 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); | 437 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); |
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 | ||
455 | void ComposeMail::reject() | 455 | void 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 | ||
479 | ComposeMail::~ComposeMail() | 479 | ComposeMail::~ComposeMail() |
480 | { | 480 | { |
481 | } | 481 | } |
482 | 482 | ||
483 | void ComposeMail::reEditMail(const RecMailP¤t) | 483 | void ComposeMail::reEditMail(const RecMailP¤t) |
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 | ||
494 | AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) | 494 | AttachViewItem::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 | ||