Diffstat (limited to 'noncore/multimedia/opieplayer2/inputDialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/inputDialog.cpp | 15 |
1 files changed, 11 insertions, 4 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 | |||
@@ -1,9 +1,11 @@ | |||
1 | #include "inputDialog.h" | 1 | #include "inputDialog.h" |
2 | 2 | ||
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> |
8 | #include <qlayout.h> | 10 | #include <qlayout.h> |
9 | #include <qvariant.h> | 11 | #include <qvariant.h> |
@@ -40,8 +42,9 @@ InputDialog::~InputDialog() { | |||
40 | } | 42 | } |
41 | 43 | ||
42 | void InputDialog::browse() { | 44 | void InputDialog::browse() { |
43 | 45 | Config cfg( "OpiePlayer" ); | |
44 | MimeTypes types; | 46 | cfg.setGroup("Dialog"); |
47 | MimeTypes types; | ||
45 | QStringList audio, video, all; | 48 | QStringList audio, video, all; |
46 | audio << "audio/*"; | 49 | audio << "audio/*"; |
47 | audio << "playlist/plain"; | 50 | audio << "playlist/plain"; |
@@ -56,7 +59,11 @@ void InputDialog::browse() { | |||
56 | types.insert("Audio", audio ); | 59 | types.insert("Audio", audio ); |
57 | types.insert("Video", video ); | 60 | types.insert("Video", video ); |
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 | } |
62 | 69 | ||