-rw-r--r-- | kmicromail/editaccounts.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index 8253c91..f1075c0 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp | |||
@@ -368,32 +368,38 @@ void IMAPconfig::fillValues() | |||
368 | passLine->setText( data->getPassword() ); | 368 | passLine->setText( data->getPassword() ); |
369 | prefixLine->setText(data->getPrefix()); | 369 | prefixLine->setText(data->getPrefix()); |
370 | localFolder->setText( data->getLocalFolder() ); | 370 | localFolder->setText( data->getLocalFolder() ); |
371 | int max = data->getMaxMailSize() ; | 371 | int max = data->getMaxMailSize() ; |
372 | if ( max ) { | 372 | if ( max ) { |
373 | CheckBoxDown->setChecked( true ); | 373 | CheckBoxDown->setChecked( true ); |
374 | SpinBoxDown->setValue ( max ); | 374 | SpinBoxDown->setValue ( max ); |
375 | } else { | 375 | } else { |
376 | CheckBoxDown->setChecked( false ); | 376 | CheckBoxDown->setChecked( false ); |
377 | SpinBoxDown->setValue ( 5 ); | 377 | SpinBoxDown->setValue ( 5 ); |
378 | } | 378 | } |
379 | CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); | 379 | CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); |
380 | } | 380 | } |
381 | 381 | ||
382 | void IMAPconfig::accept() | 382 | void IMAPconfig::accept() |
383 | { | 383 | { |
384 | if ( localFolder->text().contains("/") ||localFolder->text().contains("\\") ) { | ||
385 | QMessageBox::information( this, i18n( "Error" ), | ||
386 | i18n( "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically." ), | ||
387 | i18n( "Ok" ) ); | ||
388 | return; | ||
389 | } | ||
384 | data->setAccountName( accountLine->text() ); | 390 | data->setAccountName( accountLine->text() ); |
385 | data->setServer( serverLine->text() ); | 391 | data->setServer( serverLine->text() ); |
386 | data->setPort( portLine->text() ); | 392 | data->setPort( portLine->text() ); |
387 | data->setConnectionType( ComboBox1->currentItem() ); | 393 | data->setConnectionType( ComboBox1->currentItem() ); |
388 | data->setUser( userLine->text() ); | 394 | data->setUser( userLine->text() ); |
389 | data->setPassword( passLine->text() ); | 395 | data->setPassword( passLine->text() ); |
390 | data->setPrefix(prefixLine->text()); | 396 | data->setPrefix(prefixLine->text()); |
391 | data->setLocalFolder( localFolder->text() ); | 397 | data->setLocalFolder( localFolder->text() ); |
392 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; | 398 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; |
393 | data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); | 399 | data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); |
394 | 400 | ||
395 | QDialog::accept(); | 401 | QDialog::accept(); |
396 | } | 402 | } |
397 | 403 | ||
398 | /** | 404 | /** |
399 | * POP3config | 405 | * POP3config |
@@ -441,32 +447,38 @@ void POP3config::fillValues() | |||
441 | userLine->setText( data->getUser() ); | 447 | userLine->setText( data->getUser() ); |
442 | passLine->setText( data->getPassword() ); | 448 | passLine->setText( data->getPassword() ); |
443 | localFolder->setText( data->getLocalFolder() ); | 449 | localFolder->setText( data->getLocalFolder() ); |
444 | int max = data->getMaxMailSize() ; | 450 | int max = data->getMaxMailSize() ; |
445 | if ( max ) { | 451 | if ( max ) { |
446 | CheckBoxDown->setChecked( true ); | 452 | CheckBoxDown->setChecked( true ); |
447 | SpinBoxDown->setValue ( max ); | 453 | SpinBoxDown->setValue ( max ); |
448 | } else { | 454 | } else { |
449 | CheckBoxDown->setChecked( false ); | 455 | CheckBoxDown->setChecked( false ); |
450 | SpinBoxDown->setValue ( 5 ); | 456 | SpinBoxDown->setValue ( 5 ); |
451 | } | 457 | } |
452 | CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); | 458 | CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); |
453 | } | 459 | } |
454 | 460 | ||
455 | void POP3config::accept() | 461 | void POP3config::accept() |
456 | { | 462 | { |
463 | if ( localFolder->text().contains("/") ||localFolder->text().contains("\\") ) { | ||
464 | QMessageBox::information( this, i18n( "Error" ), | ||
465 | i18n( "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically." ), | ||
466 | i18n( "Ok" ) ); | ||
467 | return; | ||
468 | } | ||
457 | data->setAccountName( accountLine->text() ); | 469 | data->setAccountName( accountLine->text() ); |
458 | data->setServer( serverLine->text() ); | 470 | data->setServer( serverLine->text() ); |
459 | data->setPort( portLine->text() ); | 471 | data->setPort( portLine->text() ); |
460 | data->setConnectionType( ComboBox1->currentItem() ); | 472 | data->setConnectionType( ComboBox1->currentItem() ); |
461 | data->setUser( userLine->text() ); | 473 | data->setUser( userLine->text() ); |
462 | data->setPassword( passLine->text() ); | 474 | data->setPassword( passLine->text() ); |
463 | data->setLocalFolder( localFolder->text() ); | 475 | data->setLocalFolder( localFolder->text() ); |
464 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; | 476 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; |
465 | data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); | 477 | data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); |
466 | 478 | ||
467 | QDialog::accept(); | 479 | QDialog::accept(); |
468 | } | 480 | } |
469 | 481 | ||
470 | /** | 482 | /** |
471 | * SMTPconfig | 483 | * SMTPconfig |
472 | */ | 484 | */ |