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
@@ -208,13 +208,13 @@ KURLRequester::~KURLRequester()
void KURLRequester::init()
{
myFileDialog = 0L;
myShowLocalProt = false;
-
+ mPathIsDir = false;
if (/*US !d->combo && */ !d->edit )
d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" );
myButton = new KURLDragPushButton( this, "kfile button");
QIconSet iconSet = SmallIconSet("fileopen");
QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
@@ -269,13 +269,16 @@ void KURLRequester::slotOpenDialog()
emit openFileDialog( this );
//US use our special KFIleDialog instead
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;
setURL( fn );
emit urlSelected( d->url() );
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
@@ -102,12 +102,13 @@ public:
* Sets the mode of the file dialog.
* Note: you can only select one file with the filedialog,
* so KFile::Files doesn't make much sense.
* @see KFileDialog::setMode()
*/
void setMode( unsigned int m );
+ void setPathIsDir( ) {mPathIsDir = true;}
/**
* Sets the filter for the file dialog.
* @see KFileDialog::setFilter()
*/
void setFilter( const QString& filter );
@@ -231,12 +232,13 @@ protected:
private:
KURLDragPushButton * myButton;
bool myShowLocalProt;
mutable KFileDialog * myFileDialog;
+ bool mPathIsDir;
protected slots:
/**
* Called when the button is pressed to open the filedialog.
* Also called when @ref KStdAccel::Open (default is Ctrl-O) is pressed.