Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 20 |
1 files changed, 15 insertions, 5 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, - connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); + connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); + ComboBox1->insertItem( "Only if available", 0 ); + ComboBox1->insertItem( "Always, Negotiated", 1 ); + ComboBox1->insertItem( "Connect on secure port", 2 ); + ComboBox1->insertItem( "Run command instead", 3 ); + CommandEdit->hide(); + ComboBox1->setCurrentItem( data->ConnectionType() ); } -void SMTPconfig::slotSSL( bool enabled ) +void SMTPconfig::slotConnectionToggle( int index ) { - if ( enabled ) { + // 2 is ssl connection + if ( index == 2 ) { portLine->setText( SMTP_SSL_PORT ); + } else if ( index == 3 ) { + portLine->setText( SMTP_PORT ); + CommandEdit->show(); } else { @@ -389,3 +399,3 @@ void SMTPconfig::fillValues() portLine->setText( data->getPort() ); - sslBox->setChecked( data->getSSL() ); + ComboBox1->setCurrentItem( data->ConnectionType() ); loginBox->setChecked( data->getLogin() ); @@ -400,3 +410,3 @@ void SMTPconfig::accept() data->setPort( portLine->text() ); - data->setSSL( sslBox->isChecked() ); + data->setConnectionType( ComboBox1->currentItem() ); data->setLogin( loginBox->isChecked() ); |