[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdepim/kmail
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2005-07-30 4:15:28
Message-ID: 1122696928.007725.4948.nullmailer () svn ! kde ! org
[Download RAW message or body]
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 <kfiledialog.h>
#include <kabc/stdaddressbook.h>
#include <kabc/addresseelist.h>
+#include <kdirselectdialog.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kparts/browserextension.h>
@@ -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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic