From kde-commits Mon Jan 31 22:52:20 2005 From: Tom Albers Date: Mon, 31 Jan 2005 22:52:20 +0000 To: kde-commits Subject: kdepim/kmail Message-Id: <20050131225220.7FF2A1D1A5 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=110721194607539 CVS commit by toma: Replaced close() by KDialogBase::slotOk() and added a warning that creating folders with a dot is not supported by every mailserver. M +8 -1 newfolderdialog.cpp 1.3 --- kdepim/kmail/newfolderdialog.cpp #1.2:1.3 @@ -154,4 +154,11 @@ void NewFolderDialog::slotOk() KMessageBox::error( this, i18n( "Folder names cannot start with a . (dot) character; please choose another folder name." ) ); return; + } else if ( fldName.find( '.' ) != -1 && + ( !mFolder + || mFolder->folderType() == KMFolderTypeImap + || mFolder->folderType() == KMFolderTypeCachedImap ) ) { + if ( KMessageBox::warningContinueCancel( this, i18n( "Some mailservers do not support folder names which contain a . (dot) character; do you want to continue?" ), QString::null, KStdGuiItem::cont(), "warn_create_folders_with_dot_in_middle" ) == KMessageBox::Cancel ) { + return; + } } @@ -212,5 +219,5 @@ void NewFolderDialog::slotOk() newFolder->storage()->writeConfig(); // connected slots will read it } - close(); + KDialogBase::slotOk(); }