Diffstat (limited to 'noncore/multimedia/opieplayer2/inputDialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/inputDialog.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/inputDialog.cpp b/noncore/multimedia/opieplayer2/inputDialog.cpp index 62240b2..2c4be1b 100644 --- a/noncore/multimedia/opieplayer2/inputDialog.cpp +++ b/noncore/multimedia/opieplayer2/inputDialog.cpp | |||
@@ -3,5 +3,7 @@ | |||
3 | #include <qpe/resource.h> | 3 | #include <qpe/resource.h> |
4 | 4 | #include <qpe/qpeapplication.h> | |
5 | #include <qpe/config.h> | ||
5 | #include <opie/ofiledialog.h> | 6 | #include <opie/ofiledialog.h> |
6 | 7 | ||
8 | #include <qfileinfo.h> | ||
7 | #include <qlineedit.h> | 9 | #include <qlineedit.h> |
@@ -42,3 +44,4 @@ InputDialog::~InputDialog() { | |||
42 | void InputDialog::browse() { | 44 | void InputDialog::browse() { |
43 | 45 | Config cfg( "OpiePlayer" ); | |
46 | cfg.setGroup("Dialog"); | ||
44 | MimeTypes types; | 47 | MimeTypes types; |
@@ -58,4 +61,8 @@ void InputDialog::browse() { | |||
58 | 61 | ||
59 | QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); | 62 | QString str = OFileDialog::getOpenFileName( 1, |
63 | cfg.readEntry("LastDirectory",QPEApplication::documentDir()),"", | ||
64 | types, 0 ); | ||
65 | if(str.left(2) == "//") str=str.right(str.length()-1); | ||
60 | LineEdit1->setText(str); | 66 | LineEdit1->setText(str); |
67 | cfg.writeEntry("LastDirectory" ,QFileInfo(str).dirPath()); | ||
61 | } | 68 | } |