-rw-r--r-- | microkde/kfiledialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index 309f8dc..3f47425 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp | |||
@@ -11,51 +11,51 @@ | |||
11 | QString KFileDialog::getSaveFileName( const QString & fn, | 11 | QString KFileDialog::getSaveFileName( const QString & fn, |
12 | const QString & cap , QWidget * par ) | 12 | const QString & cap , QWidget * par ) |
13 | { | 13 | { |
14 | QString retfile = ""; | 14 | QString retfile = ""; |
15 | QDialog dia ( par, "input-dialog", true ); | 15 | QDialog dia ( par, "input-dialog", true ); |
16 | QVBoxLayout lay( &dia ); | 16 | QVBoxLayout lay( &dia ); |
17 | lay.setMargin(7); | 17 | lay.setMargin(7); |
18 | lay.setSpacing(7); | 18 | lay.setSpacing(7); |
19 | dia.setCaption( cap ); | ||
20 | QString file = fn; | 19 | QString file = fn; |
21 | if ( file.isEmpty() ) | 20 | if ( file.isEmpty() ) |
22 | file = QDir::homeDirPath()+"/*"; | 21 | file = QDir::homeDirPath()+"/*"; |
23 | QFileInfo fi ( file ); | 22 | QFileInfo fi ( file ); |
24 | 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() ); |
25 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); | 24 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); |
26 | lay.addWidget( &o); | 25 | lay.addWidget( &o); |
27 | // o.setNewVisible( true ); | 26 | // o.setNewVisible( true ); |
28 | // o.setNameVisible( true ); | 27 | // o.setNameVisible( true ); |
29 | dia.showMaximized(); | 28 | dia.showMaximized(); |
29 | dia.setCaption( cap ); | ||
30 | int res = dia.exec(); | 30 | int res = dia.exec(); |
31 | if ( res ) | 31 | if ( res ) |
32 | retfile = o.selectedName(); | 32 | retfile = o.selectedName(); |
33 | return retfile; | 33 | return retfile; |
34 | } | 34 | } |
35 | 35 | ||
36 | QString KFileDialog::getOpenFileName( const QString & fn, | 36 | QString KFileDialog::getOpenFileName( const QString & fn, |
37 | const QString & cap, QWidget * par ) | 37 | const QString & cap, QWidget * par ) |
38 | { | 38 | { |
39 | QString retfile = ""; | 39 | QString retfile = ""; |
40 | QDialog dia ( par, "input-dialog", true ); | 40 | QDialog dia ( par, "input-dialog", true ); |
41 | // QLineEdit lab ( &dia ); | 41 | // QLineEdit lab ( &dia ); |
42 | QVBoxLayout lay( &dia ); | 42 | QVBoxLayout lay( &dia ); |
43 | lay.setMargin(7); | 43 | lay.setMargin(7); |
44 | lay.setSpacing(7); | 44 | lay.setSpacing(7); |
45 | dia.setCaption( cap ); | ||
46 | QString file = fn; | 45 | QString file = fn; |
47 | if ( file.isEmpty() ) | 46 | if ( file.isEmpty() ) |
48 | file = QDir::homeDirPath()+"/*";; | 47 | file = QDir::homeDirPath()+"/*";; |
49 | QFileInfo fi ( file ); | 48 | QFileInfo fi ( file ); |
50 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); | 49 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); |
51 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); | 50 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); |
52 | lay.addWidget( &o); | 51 | lay.addWidget( &o); |
53 | dia.showMaximized(); | 52 | dia.showMaximized(); |
53 | dia.setCaption( cap ); | ||
54 | int res = dia.exec(); | 54 | int res = dia.exec(); |
55 | if ( res ) | 55 | if ( res ) |
56 | retfile = o.selectedName(); | 56 | retfile = o.selectedName(); |
57 | return retfile; | 57 | return retfile; |
58 | } | 58 | } |
59 | 59 | ||
60 | #else | 60 | #else |
61 | 61 | ||