-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() mail->setCC( ccLine->text().utf8 () ); mail->setBCC( bccLine->text().utf8 () ); mail->setReply( replyLine->text().utf8 () ); mail->setSubject( subjectLine->text().utf8 () ); if (!m_replyid.isEmpty()) { QStringList ids; ids.append(m_replyid.utf8 ()); mail->setInreply(ids); } QString txt = message->text().utf8 (); if ( !sigMultiLine->text().isEmpty() ) { txt.append( "\n--\n" ); txt.append( sigMultiLine->text().utf8 () ); } mail->setMessage( txt ); AttachViewItem *it = (AttachViewItem *) attList->firstChild(); while ( it != 0 ) { mail->addAttachment( it->getAttachment() ); it = (AttachViewItem *) it->nextSibling(); } SMTPwrapper wrapper( smtp ); if ( wrapper.sendMail( mail,checkBoxLater->isChecked() ) ) setStatus( tr ("Mail sent")); else { setStatus( tr ("Error: Something went wrong. Nothing sent")); return; } QDialog::accept(); } void ComposeMail::reject() { //qDebug("ComposeMail::reject() "); int yesno = QMessageBox::warning(0,i18n("Store message?"), i18n("Store message into drafts?\n"), i18n("Yes"), i18n("No")); //qDebug("button %d ", yesno); if (yesno == 0) { if ( toLine->text().isEmpty() ) { QMessageBox::warning(0,i18n("Sending mail"), i18n("No Receiver spezified" ) ); return; } saveAsDraft(); } if (yesno == 2) { qDebug("return "); return; } QDialog::reject(); } ComposeMail::~ComposeMail() { } void ComposeMail::reEditMail(const RecMailP¤t) { RecMailP data = current; - message->setText(QString::fromUtf8( data->Wrapper()->fetchBody(current)->Bodytext().latin1() )); - subjectLine->setText( QString::fromUtf8( data->getSubject().latin1() )); - toLine->setText(QString::fromUtf8( data->To().join(",").latin1() )); - ccLine->setText(QString::fromUtf8( data->CC().join(",").latin1() )); - bccLine->setText(QString::fromUtf8( data->Bcc().join(",").latin1() )); - replyLine->setText(QString::fromUtf8( data->Replyto().latin1() )); + message->setText(data->Wrapper()->fetchBody(current)->Bodytext()); + subjectLine->setText( data->getSubject()); + toLine->setText(data->To().join(",")); + ccLine->setText(data->CC().join(",")); + bccLine->setText(data->Bcc().join(",")); + replyLine->setText(data->Replyto()); } AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) : QListViewItem( parent ) { attachment = att; if ( !attachment->getPixmap().isNull() ) setPixmap( 0,attachment->getPixmap() ); setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); setText( 1, QString::number( att->getSize() ) ); } |