-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 @@ -372,24 +372,30 @@ void IMAPconfig::fillValues() if ( max ) { CheckBoxDown->setChecked( true ); SpinBoxDown->setValue ( max ); } else { CheckBoxDown->setChecked( false ); SpinBoxDown->setValue ( 5 ); } CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); } void IMAPconfig::accept() { + if ( localFolder->text().contains("/") ||localFolder->text().contains("\\") ) { + QMessageBox::information( this, i18n( "Error" ), + i18n( "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically." ), + i18n( "Ok" ) ); + return; + } data->setAccountName( accountLine->text() ); data->setServer( serverLine->text() ); data->setPort( portLine->text() ); data->setConnectionType( ComboBox1->currentItem() ); data->setUser( userLine->text() ); data->setPassword( passLine->text() ); data->setPrefix(prefixLine->text()); data->setLocalFolder( localFolder->text() ); data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); QDialog::accept(); @@ -445,24 +451,30 @@ void POP3config::fillValues() if ( max ) { CheckBoxDown->setChecked( true ); SpinBoxDown->setValue ( max ); } else { CheckBoxDown->setChecked( false ); SpinBoxDown->setValue ( 5 ); } CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); } void POP3config::accept() { + if ( localFolder->text().contains("/") ||localFolder->text().contains("\\") ) { + QMessageBox::information( this, i18n( "Error" ), + i18n( "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically." ), + i18n( "Ok" ) ); + return; + } data->setAccountName( accountLine->text() ); data->setServer( serverLine->text() ); data->setPort( portLine->text() ); data->setConnectionType( ComboBox1->currentItem() ); data->setUser( userLine->text() ); data->setPassword( passLine->text() ); data->setLocalFolder( localFolder->text() ); data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); QDialog::accept(); } |