-rw-r--r-- | microkde/kfiledialog.cpp | 11 | ||||
-rw-r--r-- | microkde/kfiledialog.h | 2 | ||||
-rw-r--r-- | microkde/kio/kfile/kurlrequester.cpp | 7 | ||||
-rw-r--r-- | microkde/kio/kfile/kurlrequester.h | 2 |
4 files changed, 19 insertions, 3 deletions
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index 6be1580..c64f325 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp | |||
@@ -61,3 +61,7 @@ QString KFileDialog::getOpenFileName( const QString & fn, | |||
61 | } | 61 | } |
62 | 62 | QString KFileDialog::getExistingDirectory( const QString & fn, | |
63 | const QString & cap, QWidget * par ) | ||
64 | { | ||
65 | return KFileDialog::getSaveFileName( fn, cap, pr ); | ||
66 | } | ||
63 | #else | 67 | #else |
@@ -77,2 +81,7 @@ QString KFileDialog::getOpenFileName( const QString & fn, | |||
77 | } | 81 | } |
82 | QString KFileDialog::getExistingDirectory( const QString & fn, | ||
83 | const QString & cap, QWidget * par ) | ||
84 | { | ||
85 | return QFileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); | ||
86 | } | ||
78 | #endif | 87 | #endif |
diff --git a/microkde/kfiledialog.h b/microkde/kfiledialog.h index 0825872..90709cd 100644 --- a/microkde/kfiledialog.h +++ b/microkde/kfiledialog.h | |||
@@ -17,2 +17,4 @@ class KFileDialog | |||
17 | 17 | ||
18 | static QString getExistingDirectory( const QString &, | ||
19 | const QString &, QWidget * ); | ||
18 | }; | 20 | }; |
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 | |||
@@ -213,3 +213,3 @@ void KURLRequester::init() | |||
213 | myShowLocalProt = false; | 213 | myShowLocalProt = false; |
214 | 214 | mPathIsDir = false; | |
215 | if (/*US !d->combo && */ !d->edit ) | 215 | if (/*US !d->combo && */ !d->edit ) |
@@ -274,3 +274,6 @@ void KURLRequester::slotOpenDialog() | |||
274 | QString fn = d->edit->text(); | 274 | QString fn = d->edit->text(); |
275 | fn = KFileDialog::getSaveFileName( fn, "", this ); | 275 | if ( mPathIsDir ) |
276 | fn = KFileDialog::getExistingDirectory ( fn, "", this ); | ||
277 | else | ||
278 | fn = KFileDialog::getSaveFileName( fn, "", this ); | ||
276 | 279 | ||
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 | |||
@@ -107,2 +107,3 @@ public: | |||
107 | void setMode( unsigned int m ); | 107 | void setMode( unsigned int m ); |
108 | void setPathIsDir( ) {mPathIsDir = true;} | ||
108 | 109 | ||
@@ -236,2 +237,3 @@ private: | |||
236 | mutable KFileDialog * myFileDialog; | 237 | mutable KFileDialog * myFileDialog; |
238 | bool mPathIsDir; | ||
237 | 239 | ||