author | zautrix <zautrix> | 2004-11-06 23:30:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-11-06 23:30:02 (UTC) |
commit | 023e0e82dd8bf6421d12492a2dd25534fc43ad31 (patch) (side-by-side diff) | |
tree | cf0533e3ccc642cb57a41953f184f457fa5365ba /kmicromail/composemail.cpp | |
parent | f8841c92d5251f713eb7a025af8fdee52de45b3d (diff) | |
download | kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.zip kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.tar.gz kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.tar.bz2 |
many ompi fixes
-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 @@ -390,114 +390,114 @@ void ComposeMail::accept() reject(); return; } if (! checkBoxLater->isChecked() ) { int yesno = QMessageBox::warning(0,i18n("Stop editing message"), i18n("Send this message?"), i18n("Yes"), i18n("Cancel")); if (yesno == 1) { return; } } #if 0 odebug << "Sending Mail with " << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl; #endif Opie::Core::OSmartPointer<Mail> mail=new Mail; SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); mail->setMail(fromBox->currentText().utf8 ()); if ( !toLine->text().isEmpty() ) { mail->setTo( toLine->text().utf8 () ); } else { QMessageBox::warning(0,i18n("Sending mail"), i18n("No Receiver spezified" ) ); return; } mail->setName(senderNameEdit->text().utf8 ()); 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() ) ); } |