-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 | |||
@@ -60,5 +60,9 @@ QString KFileDialog::getOpenFileName( const QString & fn, | |||
60 | return retfile; | 60 | return retfile; |
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 |
64 | 68 | ||
@@ -76,4 +80,9 @@ QString KFileDialog::getOpenFileName( const QString & fn, | |||
76 | return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); | 80 | return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); |
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 |
79 | 88 | ||
diff --git a/microkde/kfiledialog.h b/microkde/kfiledialog.h index 0825872..90709cd 100644 --- a/microkde/kfiledialog.h +++ b/microkde/kfiledialog.h | |||
@@ -16,4 +16,6 @@ class KFileDialog | |||
16 | const QString &, QWidget * ); | 16 | const QString &, QWidget * ); |
17 | 17 | ||
18 | static QString getExistingDirectory( const QString &, | ||
19 | const QString &, QWidget * ); | ||
18 | }; | 20 | }; |
19 | 21 | ||
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() | |||
212 | myFileDialog = 0L; | 212 | myFileDialog = 0L; |
213 | myShowLocalProt = false; | 213 | myShowLocalProt = false; |
214 | 214 | mPathIsDir = false; | |
215 | if (/*US !d->combo && */ !d->edit ) | 215 | if (/*US !d->combo && */ !d->edit ) |
216 | d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" ); | 216 | d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" ); |
@@ -273,5 +273,8 @@ void KURLRequester::slotOpenDialog() | |||
273 | //QString fn = u.url(); | 273 | //QString fn = u.url(); |
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 | ||
277 | if ( fn == "" ) | 280 | if ( fn == "" ) |
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: | |||
106 | */ | 106 | */ |
107 | void setMode( unsigned int m ); | 107 | void setMode( unsigned int m ); |
108 | void setPathIsDir( ) {mPathIsDir = true;} | ||
108 | 109 | ||
109 | /** | 110 | /** |
@@ -235,4 +236,5 @@ private: | |||
235 | bool myShowLocalProt; | 236 | bool myShowLocalProt; |
236 | mutable KFileDialog * myFileDialog; | 237 | mutable KFileDialog * myFileDialog; |
238 | bool mPathIsDir; | ||
237 | 239 | ||
238 | 240 | ||