summaryrefslogtreecommitdiffabout
path: root/kmicromail/editaccounts.cpp
authorzautrix <zautrix>2005-03-10 21:14:19 (UTC)
committer zautrix <zautrix>2005-03-10 21:14:19 (UTC)
commit6e3c3178fa8e0c421753c08506b4a91bbcecc26f (patch) (unidiff)
treeff9c2b22376e71e135f59154c6aeeb8ed95f10ce /kmicromail/editaccounts.cpp
parent3a1891136e7b1290a6b3ddd573a863e51bd3047b (diff)
downloadkdepimpi-6e3c3178fa8e0c421753c08506b4a91bbcecc26f.zip
kdepimpi-6e3c3178fa8e0c421753c08506b4a91bbcecc26f.tar.gz
kdepimpi-6e3c3178fa8e0c421753c08506b4a91bbcecc26f.tar.bz2
smtp ompi fix
Diffstat (limited to 'kmicromail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/editaccounts.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index f1075c0..49049f6 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -317,41 +317,42 @@ SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char
317} 317}
318 318
319void SelectMailType::slotSelection( const QString &sel ) 319void SelectMailType::slotSelection( const QString &sel )
320{ 320{
321 selected->replace( 0, selected->length(), sel ); 321 selected->replace( 0, selected->length(), sel );
322} 322}
323 323
324/** 324/**
325 * IMAPconfig 325 * IMAPconfig
326 */ 326 */
327 327
328IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 328IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
329 : IMAPconfigUI( parent, name, modal, flags ) 329 : IMAPconfigUI( parent, name, modal, flags )
330{ 330{
331 data = account; 331 data = account;
332 332
333 fillValues(); 333 //fillValues();
334 334
335 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); 335 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
336 ComboBox1->insertItem( "Only if available", 0 ); 336 ComboBox1->insertItem( "Only if available", 0 );
337 ComboBox1->insertItem( "Always, Negotiated", 1 ); 337 ComboBox1->insertItem( "Always, Negotiated", 1 );
338 ComboBox1->insertItem( "Connect on secure port", 2 ); 338 ComboBox1->insertItem( "Connect on secure port", 2 );
339 ComboBox1->insertItem( "Run command instead", 3 ); 339 ComboBox1->insertItem( "Run command instead", 3 );
340 CommandEdit->hide(); 340 CommandEdit->hide();
341 ComboBox1->setCurrentItem( data->ConnectionType() ); 341 fillValues();
342 // ComboBox1->setCurrentItem( data->ConnectionType() );
342} 343}
343 344
344void IMAPconfig::slotConnectionToggle( int index ) 345void IMAPconfig::slotConnectionToggle( int index )
345{ 346{
346 if ( index == 2 ) 347 if ( index == 2 )
347 { 348 {
348 portLine->setText( IMAP_SSL_PORT ); 349 portLine->setText( IMAP_SSL_PORT );
349 } 350 }
350 else if ( index == 3 ) 351 else if ( index == 3 )
351 { 352 {
352 portLine->setText( IMAP_PORT ); 353 portLine->setText( IMAP_PORT );
353 CommandEdit->show(); 354 CommandEdit->show();
354 } 355 }
355 else 356 else
356 { 357 {
357 portLine->setText( IMAP_PORT ); 358 portLine->setText( IMAP_PORT );
@@ -396,41 +397,42 @@ void IMAPconfig::accept()
396 data->setPrefix(prefixLine->text()); 397 data->setPrefix(prefixLine->text());
397 data->setLocalFolder( localFolder->text() ); 398 data->setLocalFolder( localFolder->text() );
398 data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; 399 data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ;
399 data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); 400 data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() );
400 401
401 QDialog::accept(); 402 QDialog::accept();
402} 403}
403 404
404/** 405/**
405 * POP3config 406 * POP3config
406 */ 407 */
407 408
408POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 409POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags )
409 : POP3configUI( parent, name, modal, flags ) 410 : POP3configUI( parent, name, modal, flags )
410{ 411{
411 data = account; 412 data = account;
412 fillValues(); 413 //fillValues();
413 414
414 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); 415 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
415 ComboBox1->insertItem( "Only if available", 0 ); 416 ComboBox1->insertItem( "Only if available", 0 );
416 ComboBox1->insertItem( "Always, Negotiated", 1 ); 417 ComboBox1->insertItem( "Always, Negotiated", 1 );
417 ComboBox1->insertItem( "Connect on secure port", 2 ); 418 ComboBox1->insertItem( "Connect on secure port", 2 );
418 ComboBox1->insertItem( "Run command instead", 3 ); 419 ComboBox1->insertItem( "Run command instead", 3 );
419 CommandEdit->hide(); 420 CommandEdit->hide();
420 ComboBox1->setCurrentItem( data->ConnectionType() ); 421 fillValues();
422 //ComboBox1->setCurrentItem( data->ConnectionType() );
421} 423}
422 424
423void POP3config::slotConnectionToggle( int index ) 425void POP3config::slotConnectionToggle( int index )
424{ 426{
425 // 2 is ssl connection 427 // 2 is ssl connection
426 if ( index == 2 ) 428 if ( index == 2 )
427 { 429 {
428 portLine->setText( POP3_SSL_PORT ); 430 portLine->setText( POP3_SSL_PORT );
429 } 431 }
430 else if ( index == 3 ) 432 else if ( index == 3 )
431 { 433 {
432 portLine->setText( POP3_PORT ); 434 portLine->setText( POP3_PORT );
433 CommandEdit->show(); 435 CommandEdit->show();
434 } 436 }
435 else 437 else
436 { 438 {
@@ -478,47 +480,49 @@ void POP3config::accept()
478 480
479 QDialog::accept(); 481 QDialog::accept();
480} 482}
481 483
482/** 484/**
483 * SMTPconfig 485 * SMTPconfig
484 */ 486 */
485 487
486SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 488SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
487 : SMTPconfigUI( parent, name, modal, flags ) 489 : SMTPconfigUI( parent, name, modal, flags )
488{ 490{
489 data = account; 491 data = account;
490 492
491 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); 493 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) );
492 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); 494 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
493 495
494 fillValues(); 496 // fillValues();
495 QIconSet icon; 497 QIconSet icon;
496 //icon = SmallIcon("fileexport"); 498 //icon = SmallIcon("fileexport");
497 icon = SmallIcon("fileopen"); 499 icon = SmallIcon("fileopen");
498 SignaturButton->setText(""); 500 SignaturButton->setText("");
499 SignaturButton->setIconSet (icon ) ; 501 SignaturButton->setIconSet (icon ) ;
500 SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ; 502 SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ;
501 connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) ); 503 connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) );
502 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); 504 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
503 ComboBox1->insertItem( "Only if available", 0 ); 505 ComboBox1->insertItem( "No secure connection, no TLS", 0 );
504 ComboBox1->insertItem( "Always, Negotiated", 1 ); 506 ComboBox1->insertItem( "Only if available, try TLS", 1 );
505 ComboBox1->insertItem( "Connect on secure port", 2 ); 507 ComboBox1->insertItem( "Always, use TLS", 2 );
506 ComboBox1->insertItem( "Run command instead", 3 ); 508 ComboBox1->insertItem( "Connect on secure port (SSL)", 3 );
509 ComboBox1->insertItem( "Run command instead", 4 );
507 CommandEdit->hide(); 510 CommandEdit->hide();
508 ComboBox1->setCurrentItem( data->ConnectionType() ); 511 fillValues();
512 //ComboBox1->setCurrentItem( data->ConnectionType() );
509} 513}
510void SMTPconfig::chooseSig() 514void SMTPconfig::chooseSig()
511{ 515{
512 QString lnk = KFileDialog::getOpenFileName( "", "Choose Signatur File", this ); 516 QString lnk = KFileDialog::getOpenFileName( "", "Choose Signatur File", this );
513 if ( !lnk.isEmpty() ) { 517 if ( !lnk.isEmpty() ) {
514 SignaturEdit->setText( lnk ); 518 SignaturEdit->setText( lnk );
515 } 519 }
516} 520}
517void SMTPconfig::slotConnectionToggle( int index ) 521void SMTPconfig::slotConnectionToggle( int index )
518{ 522{
519 // 2 is ssl connection 523 // 2 is ssl connection
520 if ( index == 2 ) 524 if ( index == 2 )
521 { 525 {
522 portLine->setText( SMTP_SSL_PORT ); 526 portLine->setText( SMTP_SSL_PORT );
523 } 527 }
524 else if ( index == 3 ) 528 else if ( index == 3 )