author | llornkcor <llornkcor> | 2002-11-10 16:52:56 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-10 16:52:56 (UTC) |
commit | 81e63be3c1e21da2a2f97df1fc38417e7ca814e1 (patch) (unidiff) | |
tree | 66b526df2913150cc67d0d2d8e4283c791ae891f /noncore/multimedia/opieplayer2/inputDialog.cpp | |
parent | 5a8660a4089fa2160da47e2a4d63baea431b48b1 (diff) | |
download | opie-81e63be3c1e21da2a2f97df1fc38417e7ca814e1.zip opie-81e63be3c1e21da2a2f97df1fc38417e7ca814e1.tar.gz opie-81e63be3c1e21da2a2f97df1fc38417e7ca814e1.tar.bz2 |
fix file add slowdown, and make fileselector remember last directory
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 | |||
@@ -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,4 +44,5 @@ InputDialog::~InputDialog() { | |||
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; |
@@ -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 | } |