-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 @@ -151,3 +151,5 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); - + connect( SaveSigButton, SIGNAL( clicked() ), SLOT( saveSig()) ); + if ( smtpAccountBox->count()) + fillValues(0); @@ -167,4 +169,11 @@ void ComposeMail::fillSettings() } - - +void ComposeMail::saveSig() +{ + if ( smtpAccountBox->count()) { + int cur = smtpAccountBox->currentItem (); + SMTPaccount *smtp = smtpAccounts.at( cur ); + if ( smtp ) + smtp->setSignature( sigMultiLine->text()); + } +} void ComposeMail::saveAsDraft() @@ -340,3 +349,3 @@ void ComposeMail::pickAddressReply() -void ComposeMail::fillValues( int ) +void ComposeMail::fillValues( int current ) { @@ -356,4 +365,6 @@ void ComposeMail::fillValues( int ) } - sigMultiLine->setText( smtp->getSignature() ); #endif + SMTPaccount *smtp = smtpAccounts.at( current ); + if ( smtp ) + sigMultiLine->setText( smtp->getSignature() ); } |