author | harlekin <harlekin> | 2004-01-08 22:00:28 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-01-08 22:00:28 (UTC) |
commit | 96f44572cb3ac54a685515694d6c095101df9365 (patch) (unidiff) | |
tree | 5b2aa1b30990dee38df43f51478dc58b0c62d6d5 /noncore/net/mail/editaccounts.cpp | |
parent | fb30e3e116d8616cb05b3765ae1aed5f7e96c74e (diff) | |
download | opie-96f44572cb3ac54a685515694d6c095101df9365.zip opie-96f44572cb3ac54a685515694d6c095101df9365.tar.gz opie-96f44572cb3ac54a685515694d6c095101df9365.tar.bz2 |
more smtp settings
Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 22 |
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 | |||
@@ -369,15 +369,25 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, | |||
369 | connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) ); | 369 | connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) ); |
370 | 370 | ||
371 | fillValues(); | 371 | fillValues(); |
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 | ||
376 | void SMTPconfig::slotSSL( bool enabled ) | 382 | void 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 { |
381 | portLine->setText( SMTP_PORT ); | 391 | portLine->setText( SMTP_PORT ); |
382 | } | 392 | } |
383 | } | 393 | } |
@@ -386,9 +396,9 @@ void SMTPconfig::fillValues() | |||
386 | { | 396 | { |
387 | accountLine->setText( data->getAccountName() ); | 397 | accountLine->setText( data->getAccountName() ); |
388 | serverLine->setText( data->getServer() ); | 398 | serverLine->setText( data->getServer() ); |
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() ); |
392 | userLine->setText( data->getUser() ); | 402 | userLine->setText( data->getUser() ); |
393 | passLine->setText( data->getPassword() ); | 403 | passLine->setText( data->getPassword() ); |
394 | } | 404 | } |
@@ -397,9 +407,9 @@ void SMTPconfig::accept() | |||
397 | { | 407 | { |
398 | data->setAccountName( accountLine->text() ); | 408 | data->setAccountName( accountLine->text() ); |
399 | data->setServer( serverLine->text() ); | 409 | data->setServer( serverLine->text() ); |
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() ); |
403 | data->setUser( userLine->text() ); | 413 | data->setUser( userLine->text() ); |
404 | data->setPassword( passLine->text() ); | 414 | data->setPassword( passLine->text() ); |
405 | 415 | ||