summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2005-04-27 23:23:17 (UTC)
committer zautrix <zautrix>2005-04-27 23:23:17 (UTC)
commit1540fc9be514330c76c999562fcf3e6bc1e2ffbb (patch) (unidiff)
treeade066f57be45f0d9783c0efa4e869fee337dd51 /microkde
parent3978688cbe832e2b72c8048b96c9a7c43ce11bc9 (diff)
downloadkdepimpi-1540fc9be514330c76c999562fcf3e6bc1e2ffbb.zip
kdepimpi-1540fc9be514330c76c999562fcf3e6bc1e2ffbb.tar.gz
kdepimpi-1540fc9be514330c76c999562fcf3e6bc1e2ffbb.tar.bz2
csv fixes
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kfiledialog.cpp5
-rw-r--r--microkde/kio/kfile/kurlrequester.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp
index 3f47425..6be1580 100644
--- a/microkde/kfiledialog.cpp
+++ b/microkde/kfiledialog.cpp
@@ -17,25 +17,28 @@ QString KFileDialog::getSaveFileName( const QString & fn,
17 lay.setMargin(7); 17 lay.setMargin(7);
18 lay.setSpacing(7); 18 lay.setSpacing(7);
19 QString file = fn; 19 QString file = fn;
20 if ( file.isEmpty() ) 20 if ( file.isEmpty() )
21 file = QDir::homeDirPath()+"/*"; 21 file = QDir::homeDirPath()+"/*";
22 QFileInfo fi ( file ); 22 QFileInfo fi ( file );
23 OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() ); 23 OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() );
24 QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); 24 QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) );
25 lay.addWidget( &o); 25 lay.addWidget( &o);
26 // o.setNewVisible( true ); 26 // o.setNewVisible( true );
27 // o.setNameVisible( true ); 27 // o.setNameVisible( true );
28 dia.showMaximized(); 28 dia.showMaximized();
29 dia.setCaption( cap ); 29 if ( cap.isEmpty() )
30 dia.setCaption( file );
31 else
32 dia.setCaption( cap );
30 int res = dia.exec(); 33 int res = dia.exec();
31 if ( res ) 34 if ( res )
32 retfile = o.selectedName(); 35 retfile = o.selectedName();
33 return retfile; 36 return retfile;
34} 37}
35 38
36QString KFileDialog::getOpenFileName( const QString & fn, 39QString KFileDialog::getOpenFileName( const QString & fn,
37 const QString & cap, QWidget * par ) 40 const QString & cap, QWidget * par )
38{ 41{
39 QString retfile = ""; 42 QString retfile = "";
40 QDialog dia ( par, "input-dialog", true ); 43 QDialog dia ( par, "input-dialog", true );
41 // QLineEdit lab ( &dia ); 44 // QLineEdit lab ( &dia );
diff --git a/microkde/kio/kfile/kurlrequester.cpp b/microkde/kio/kfile/kurlrequester.cpp
index 6d39308..991c8be 100644
--- a/microkde/kio/kfile/kurlrequester.cpp
+++ b/microkde/kio/kfile/kurlrequester.cpp
@@ -263,25 +263,25 @@ QString KURLRequester::url() const
263 return d->url(); 263 return d->url();
264} 264}
265 265
266 266
267void KURLRequester::slotOpenDialog() 267void KURLRequester::slotOpenDialog()
268{ 268{
269 emit openFileDialog( this ); 269 emit openFileDialog( this );
270 270
271//US use our special KFIleDialog instead 271//US use our special KFIleDialog instead
272 KURL u( url() ); 272 KURL u( url() );
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, "Save backup filename", this ); 275 fn = KFileDialog::getSaveFileName( fn, "", this );
276 276
277 if ( fn == "" ) 277 if ( fn == "" )
278 return; 278 return;
279 279
280 setURL( fn ); 280 setURL( fn );
281 emit urlSelected( d->url() ); 281 emit urlSelected( d->url() );
282/*US 282/*US
283 KFileDialog *dlg = fileDialog(); 283 KFileDialog *dlg = fileDialog();
284 if ( !d->url().isEmpty() ) { 284 if ( !d->url().isEmpty() ) {
285 KURL u( url() ); 285 KURL u( url() );
286 // If we won't be able to list it (e.g. http), then don't try :) 286 // If we won't be able to list it (e.g. http), then don't try :)
287 if ( KProtocolInfo::supportsListing( u.protocol() ) ) 287 if ( KProtocolInfo::supportsListing( u.protocol() ) )