-rw-r--r-- | microkde/kio/kfile/kurlrequester.cpp | 5 | ||||
-rw-r--r-- | microkde/kio/kfile/kurlrequester.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/microkde/kio/kfile/kurlrequester.cpp b/microkde/kio/kfile/kurlrequester.cpp index 991c8be..ca94570 100644 --- a/microkde/kio/kfile/kurlrequester.cpp +++ b/microkde/kio/kfile/kurlrequester.cpp @@ -212,5 +212,5 @@ void KURLRequester::init() myFileDialog = 0L; myShowLocalProt = false; - + mPathIsDir = false; if (/*US !d->combo && */ !d->edit ) d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" ); @@ -273,4 +273,7 @@ void KURLRequester::slotOpenDialog() //QString fn = u.url(); QString fn = d->edit->text(); + if ( mPathIsDir ) + fn = KFileDialog::getExistingDirectory ( fn, "", this ); + else fn = KFileDialog::getSaveFileName( fn, "", this ); diff --git a/microkde/kio/kfile/kurlrequester.h b/microkde/kio/kfile/kurlrequester.h index 3253dd5..faa3326 100644 --- a/microkde/kio/kfile/kurlrequester.h +++ b/microkde/kio/kfile/kurlrequester.h @@ -106,4 +106,5 @@ public: */ void setMode( unsigned int m ); + void setPathIsDir( ) {mPathIsDir = true;} /** @@ -235,4 +236,5 @@ private: bool myShowLocalProt; mutable KFileDialog * myFileDialog; + bool mPathIsDir; |