author | zautrix <zautrix> | 2004-10-07 22:51:36 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 22:51:36 (UTC) |
commit | 9f1b282aa2a72f3118a89dfebbc3c8132197213a (patch) (side-by-side diff) | |
tree | edb795e1dfbc0a192a692a43a4369c84526201dd | |
parent | 21ec296f7f2832920dac336bb9f9476c80d746f5 (diff) | |
download | kdepimpi-9f1b282aa2a72f3118a89dfebbc3c8132197213a.zip kdepimpi-9f1b282aa2a72f3118a89dfebbc3c8132197213a.tar.gz kdepimpi-9f1b282aa2a72f3118a89dfebbc3c8132197213a.tar.bz2 |
ompi fixes
-rw-r--r-- | kmicromail/composemail.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index e6f7daa..946e97d 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp @@ -75,96 +75,101 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m } QStringList::ConstIterator sit = mails.begin(); for (;sit!=mails.end();++sit) { if ( (*sit)==defmail) continue; fromBox->insertItem((*sit)); } senderNameEdit->setText(con.formattedName()); #endif } else { fillSettings(); } checkBoxLater->setChecked( KOPrefs::instance()->mSendLater ); attList->addColumn( tr( "Name" ) ); attList->addColumn( tr( "Size" ) ); QList<Account> accounts = settings->getAccounts(); if ( QApplication::desktop()->width() < 320 ) smtpAccountBox->setMaximumWidth( 80 ); Account *it; for ( it = accounts.first(); it; it = accounts.next() ) { if ( it->getType()==MAILLIB::A_SMTP ) { SMTPaccount *smtp = static_cast<SMTPaccount *>(it); smtpAccountBox->insertItem( smtp->getAccountName() ); smtpAccounts.append( smtp ); } } connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); mMail = 0; warnAttach = true; if ( smtpAccounts.count() > 0 ) { fillValues( smtpAccountBox->currentItem() ); } else { QMessageBox::information( 0, tr( "Problem" ), tr( "Please create an SMTP account first.\nThe SMTP is needed for sending mail.\n" ), tr( "Ok" ) ); return; } connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); message->setFont ( KOPrefs::instance()->mComposeFont ); + message->setWordWrap (QMultiLineEdit::WidgetWidth); +#ifndef DESKTOP_VERSION + QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold ); +#endif + } void ComposeMail::fillSettings() { if ( QApplication::desktop()->width() < 320 ) fromBox->setMaximumWidth( 100 ); QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail); QStringList::ConstIterator sit = mailList.begin(); int pref = 0; for (;sit!=mailList.end();++sit) { fromBox->insertItem((*sit)); } senderNameEdit->setText(KOPrefs::instance()->mName); } void ComposeMail::saveAsDraft() { Opie::Core::OSmartPointer<Mail> mail= new Mail(); mail->setMail(fromBox->currentText()); mail->setTo( toLine->text() ); mail->setName(senderNameEdit->text()); mail->setCC( ccLine->text() ); mail->setBCC( bccLine->text() ); mail->setReply( replyLine->text() ); mail->setSubject( subjectLine->text() ); if (!m_replyid.isEmpty()) { QStringList ids; ids.append(m_replyid); mail->setInreply(ids); } QString txt = message->text(); if ( !sigMultiLine->text().isEmpty() ) { txt.append( "\n--\n" ); txt.append( sigMultiLine->text() ); } mail->setMessage( txt ); /* only use the default drafts folder name! */ Storemail wrapper(AbstractMail::draftFolder()); wrapper.storeMail(mail); AttachViewItem *it = (AttachViewItem *) attList->firstChild(); /* attachments we will ignore! */ if ( it != 0 ) { if ( warnAttach ) QMessageBox::warning(0,tr("Store message"), |