summaryrefslogtreecommitdiff
path: root/noncore/net/mail/editaccounts.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/editaccounts.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp
index de36e0d..439b619 100644
--- a/noncore/net/mail/editaccounts.cpp
+++ b/noncore/net/mail/editaccounts.cpp
@@ -314,9 +314,19 @@ POP3config::POP3config( POP3account *account, QWidget *parent, const char *name,
314 314
315 connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); 315 connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) );
316 ComboBox1->insertItem( "Only if available", 0 );
317 ComboBox1->insertItem( "Always, Negotiated", 1 );
318 ComboBox1->insertItem( "Connect on secure port", 2 );
319 ComboBox1->insertItem( "Run command instead", 3 );
320 CommandEdit->hide();
321 ComboBox1->setCurrentItem( data->ConnectionType() );
316} 322}
317 323
318void POP3config::slotSSL( bool enabled ) 324void POP3config::slotConnectionToggle( int index )
319{ 325{
320 if ( enabled ) { 326 // 2 is ssl connection
327 if ( index == 2 ) {
321 portLine->setText( POP3_SSL_PORT ); 328 portLine->setText( POP3_SSL_PORT );
329 } else if ( index == 3 ) {
330 portLine->setText( POP3_PORT );
331 CommandEdit->show();
322 } else { 332 } else {
@@ -331,3 +341,3 @@ void POP3config::fillValues()
331 portLine->setText( data->getPort() ); 341 portLine->setText( data->getPort() );
332 sslBox->setChecked( data->getSSL() ); 342 ComboBox1->setCurrentItem( data->ConnectionType() );
333 userLine->setText( data->getUser() ); 343 userLine->setText( data->getUser() );
@@ -341,3 +351,3 @@ void POP3config::accept()
341 data->setPort( portLine->text() ); 351 data->setPort( portLine->text() );
342 data->setSSL( sslBox->isChecked() ); 352 data->setConnectionType( ComboBox1->currentItem() );
343 data->setUser( userLine->text() ); 353 data->setUser( userLine->text() );