From kde-commits Sat Jul 30 04:15:28 2005 From: =?utf-8?q?Aaron=20J=2E=20Seigo?= Date: Sat, 30 Jul 2005 04:15:28 +0000 To: kde-commits Subject: branches/KDE/3.5/kdepim/kmail Message-Id: <1122696928.007725.4948.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=112269694124848 SVN commit 440315 by aseigo: use a directory selector since the user can only pick a directory and not provide names for the files M +8 -7 kmcommands.cpp --- branches/KDE/3.5/kdepim/kmail/kmcommands.cpp #440314:440315 @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -2224,18 +2225,18 @@ KURL url, dirUrl; if ( mAttachmentMap.count() > 1 ) { // get the dir - KFileDialog fdlg( ":saveAttachments", QString::null, parentWidget(), - "save attachments dialog", true ); - fdlg.setCaption( i18n("Save Attachments To") ); - fdlg.setOperationMode( KFileDialog::Saving ); - fdlg.setMode( (unsigned int) KFile::Directory ); - if ( fdlg.exec() == QDialog::Rejected || !fdlg.selectedURL().isValid() ) { + dirUrl = KDirSelectDialog::selectDirectory( QString::null, false, + parentWidget(), + i18n("Save Attachments To") ); + if ( !dirUrl.isValid() ) { setResult( Canceled ); emit completed( this ); delete this; return; } - dirUrl = fdlg.selectedURL(); + + // we may not get a slash-terminated url out of KDirSelectDialog + dirUrl.adjustPath( 1 ); } else { // only one item, get the desired filename