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 de36e0d..439b619 100644 --- a/noncore/net/mail/editaccounts.cpp +++ b/noncore/net/mail/editaccounts.cpp | |||
@@ -313,11 +313,21 @@ POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, | |||
313 | fillValues(); | 313 | fillValues(); |
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 | ||
318 | void POP3config::slotSSL( bool enabled ) | 324 | void 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 { |
323 | portLine->setText( POP3_PORT ); | 333 | portLine->setText( POP3_PORT ); |
@@ -330,5 +340,5 @@ void POP3config::fillValues() | |||
330 | serverLine->setText( data->getServer() ); | 340 | serverLine->setText( data->getServer() ); |
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() ); |
334 | passLine->setText( data->getPassword() ); | 344 | passLine->setText( data->getPassword() ); |
@@ -340,5 +350,5 @@ void POP3config::accept() | |||
340 | data->setServer( serverLine->text() ); | 350 | data->setServer( serverLine->text() ); |
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() ); |
344 | data->setPassword( passLine->text() ); | 354 | data->setPassword( passLine->text() ); |