author | zautrix <zautrix> | 2005-02-03 10:48:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-03 10:48:05 (UTC) |
commit | fb6753570dc90e936b4e89092554ab012e946a56 (patch) (unidiff) | |
tree | 6d3ae5c866f0bbb99f0b6bc8194d04d2c7681ff9 /kmicromail/composemail.cpp | |
parent | e0fce8c0f108e054cb6e4e4767affd04b398da45 (diff) | |
download | kdepimpi-fb6753570dc90e936b4e89092554ab012e946a56.zip kdepimpi-fb6753570dc90e936b4e89092554ab012e946a56.tar.gz kdepimpi-fb6753570dc90e936b4e89092554ab012e946a56.tar.bz2 |
mail fixes
-rw-r--r-- | kmicromail/composemail.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index 976e309..ed8a2ee 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp | |||
@@ -146,13 +146,15 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo | |||
146 | QMessageBox::information( 0, i18n( "Problem" ), | 146 | QMessageBox::information( 0, i18n( "Problem" ), |
147 | i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ), | 147 | i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ), |
148 | i18n( "Ok" ) ); | 148 | i18n( "Ok" ) ); |
149 | return; | 149 | return; |
150 | } | 150 | } |
151 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); | 151 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); |
152 | 152 | connect( SaveSigButton, SIGNAL( clicked() ), SLOT( saveSig()) ); | |
153 | if ( smtpAccountBox->count()) | ||
154 | fillValues(0); | ||
153 | 155 | ||
154 | } | 156 | } |
155 | 157 | ||
156 | void ComposeMail::fillSettings() | 158 | void ComposeMail::fillSettings() |
157 | { | 159 | { |
158 | if ( QApplication::desktop()->width() < 320 ) | 160 | if ( QApplication::desktop()->width() < 320 ) |
@@ -162,14 +164,21 @@ void ComposeMail::fillSettings() | |||
162 | int pref = 0; | 164 | int pref = 0; |
163 | for (;sit!=mailList.end();++sit) { | 165 | for (;sit!=mailList.end();++sit) { |
164 | fromBox->insertItem((*sit)); | 166 | fromBox->insertItem((*sit)); |
165 | } | 167 | } |
166 | senderNameEdit->setText(KOPrefs::instance()->mName); | 168 | senderNameEdit->setText(KOPrefs::instance()->mName); |
167 | } | 169 | } |
168 | 170 | void ComposeMail::saveSig() | |
169 | 171 | { | |
172 | if ( smtpAccountBox->count()) { | ||
173 | int cur = smtpAccountBox->currentItem (); | ||
174 | SMTPaccount *smtp = smtpAccounts.at( cur ); | ||
175 | if ( smtp ) | ||
176 | smtp->setSignature( sigMultiLine->text()); | ||
177 | } | ||
178 | } | ||
170 | void ComposeMail::saveAsDraft() | 179 | void ComposeMail::saveAsDraft() |
171 | { | 180 | { |
172 | 181 | ||
173 | Opie::Core::OSmartPointer<Mail> mail= new Mail(); | 182 | Opie::Core::OSmartPointer<Mail> mail= new Mail(); |
174 | mail->setMail(fromBox->currentText()); | 183 | mail->setMail(fromBox->currentText()); |
175 | mail->setTo( toLine->text() ); | 184 | mail->setTo( toLine->text() ); |
@@ -335,13 +344,13 @@ void ComposeMail::pickAddressBCC() | |||
335 | void ComposeMail::pickAddressReply() | 344 | void ComposeMail::pickAddressReply() |
336 | { | 345 | { |
337 | mPickLineEdit = replyLine; | 346 | mPickLineEdit = replyLine; |
338 | pickAddress( ); | 347 | pickAddress( ); |
339 | } | 348 | } |
340 | 349 | ||
341 | void ComposeMail::fillValues( int ) | 350 | void ComposeMail::fillValues( int current ) |
342 | { | 351 | { |
343 | #if 0 | 352 | #if 0 |
344 | SMTPaccount *smtp = smtpAccounts.at( current ); | 353 | SMTPaccount *smtp = smtpAccounts.at( current ); |
345 | ccLine->clear(); | 354 | ccLine->clear(); |
346 | if ( smtp->getUseCC() ) { | 355 | if ( smtp->getUseCC() ) { |
347 | ccLine->setText( smtp->getCC() ); | 356 | ccLine->setText( smtp->getCC() ); |
@@ -351,14 +360,16 @@ void ComposeMail::fillValues( int ) | |||
351 | bccLine->setText( smtp->getBCC() ); | 360 | bccLine->setText( smtp->getBCC() ); |
352 | } | 361 | } |
353 | replyLine->clear(); | 362 | replyLine->clear(); |
354 | if ( smtp->getUseReply() ) { | 363 | if ( smtp->getUseReply() ) { |
355 | replyLine->setText( smtp->getReply() ); | 364 | replyLine->setText( smtp->getReply() ); |
356 | } | 365 | } |
357 | sigMultiLine->setText( smtp->getSignature() ); | ||
358 | #endif | 366 | #endif |
367 | SMTPaccount *smtp = smtpAccounts.at( current ); | ||
368 | if ( smtp ) | ||
369 | sigMultiLine->setText( smtp->getSignature() ); | ||
359 | } | 370 | } |
360 | 371 | ||
361 | void ComposeMail::slotAdjustColumns() | 372 | void ComposeMail::slotAdjustColumns() |
362 | { | 373 | { |
363 | int currPage = tabWidget->currentPageIndex(); | 374 | int currPage = tabWidget->currentPageIndex(); |
364 | 375 | ||