summaryrefslogtreecommitdiffabout
path: root/microkde/kio
authorzautrix <zautrix>2005-06-11 17:03:59 (UTC)
committer zautrix <zautrix>2005-06-11 17:03:59 (UTC)
commit81370a5f955c2710b6e9336b6c412c8d630ef72a (patch) (side-by-side diff)
tree6252851fbafcbc3ff777e1af0171990124beb23e /microkde/kio
parent0cfaf22fc5d8f511320813171be84ce3436990c6 (diff)
downloadkdepimpi-81370a5f955c2710b6e9336b6c412c8d630ef72a.zip
kdepimpi-81370a5f955c2710b6e9336b6c412c8d630ef72a.tar.gz
kdepimpi-81370a5f955c2710b6e9336b6c412c8d630ef72a.tar.bz2
fixes
Diffstat (limited to 'microkde/kio') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kio/kfile/kurlrequester.cpp7
-rw-r--r--microkde/kio/kfile/kurlrequester.h2
2 files changed, 7 insertions, 2 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
@@ -211,7 +211,7 @@ void KURLRequester::init()
{
myFileDialog = 0L;
myShowLocalProt = false;
-
+ mPathIsDir = false;
if (/*US !d->combo && */ !d->edit )
d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" );
@@ -272,7 +272,10 @@ void KURLRequester::slotOpenDialog()
KURL u( url() );
//QString fn = u.url();
QString fn = d->edit->text();
- fn = KFileDialog::getSaveFileName( fn, "", this );
+ if ( mPathIsDir )
+ fn = KFileDialog::getExistingDirectory ( fn, "", this );
+ else
+ fn = KFileDialog::getSaveFileName( fn, "", this );
if ( fn == "" )
return;
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
@@ -105,6 +105,7 @@ public:
* @see KFileDialog::setMode()
*/
void setMode( unsigned int m );
+ void setPathIsDir( ) {mPathIsDir = true;}
/**
* Sets the filter for the file dialog.
@@ -234,6 +235,7 @@ private:
KURLDragPushButton * myButton;
bool myShowLocalProt;
mutable KFileDialog * myFileDialog;
+ bool mPathIsDir;
protected slots: