summaryrefslogtreecommitdiff
path: root/noncore/net/mail/editaccounts.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/editaccounts.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp
index 0c0ecaf..9fc97e8 100644
--- a/noncore/net/mail/editaccounts.cpp
+++ b/noncore/net/mail/editaccounts.cpp
@@ -372,9 +372,19 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name,
372 372
373 connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); 373 connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) );
374 ComboBox1->insertItem( "Only if available", 0 );
375 ComboBox1->insertItem( "Always, Negotiated", 1 );
376 ComboBox1->insertItem( "Connect on secure port", 2 );
377 ComboBox1->insertItem( "Run command instead", 3 );
378 CommandEdit->hide();
379 ComboBox1->setCurrentItem( data->ConnectionType() );
374} 380}
375 381
376void SMTPconfig::slotSSL( bool enabled ) 382void SMTPconfig::slotConnectionToggle( int index )
377{ 383{
378 if ( enabled ) { 384 // 2 is ssl connection
379 portLine->setText( SMTP_SSL_PORT ); 385 if ( index == 2 ) {
386 portLine->setText( SMTP_SSL_PORT );
387 } else if ( index == 3 ) {
388 portLine->setText( SMTP_PORT );
389 CommandEdit->show();
380 } else { 390 } else {
@@ -389,3 +399,3 @@ void SMTPconfig::fillValues()
389 portLine->setText( data->getPort() ); 399 portLine->setText( data->getPort() );
390 sslBox->setChecked( data->getSSL() ); 400 ComboBox1->setCurrentItem( data->ConnectionType() );
391 loginBox->setChecked( data->getLogin() ); 401 loginBox->setChecked( data->getLogin() );
@@ -400,3 +410,3 @@ void SMTPconfig::accept()
400 data->setPort( portLine->text() ); 410 data->setPort( portLine->text() );
401 data->setSSL( sslBox->isChecked() ); 411 data->setConnectionType( ComboBox1->currentItem() );
402 data->setLogin( loginBox->isChecked() ); 412 data->setLogin( loginBox->isChecked() );