Diffstat (limited to 'libopie/ofileselector/olocallister.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie/ofileselector/olocallister.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/libopie/ofileselector/olocallister.cpp b/libopie/ofileselector/olocallister.cpp index 5d7884d..4d36d64 100644 --- a/libopie/ofileselector/olocallister.cpp +++ b/libopie/ofileselector/olocallister.cpp | |||
@@ -5,11 +5,13 @@ | |||
5 | #include <qpe/mimetype.h> | 5 | #include <qpe/mimetype.h> |
6 | 6 | ||
7 | #include "ofileselector.h" | 7 | #include "ofileselector.h" |
8 | #include "ofileview.h" | ||
8 | #include "olocallister.h" | 9 | #include "olocallister.h" |
9 | 10 | ||
10 | OLocalLister::OLocalLister( OFileSelector* file ) | 11 | OLocalLister::OLocalLister( OFileSelector* file ) |
11 | : OLister( file ) | 12 | : OLister( file ) |
12 | { | 13 | { |
14 | m_dir = QDir::homeDirPath(); | ||
13 | } | 15 | } |
14 | OLocalLister::~OLocalLister() { | 16 | OLocalLister::~OLocalLister() { |
15 | } | 17 | } |
@@ -51,9 +53,12 @@ QMap<QString, QStringList> OLocalLister::mimeTypes( const QString& curDir ) { | |||
51 | * filter files | 53 | * filter files |
52 | * filter mimetypes | 54 | * filter mimetypes |
53 | */ | 55 | */ |
54 | void OLocalLister::reparse( const QString& path ) { | 56 | void OLocalLister::reparse( const QString& pa ) { |
57 | if (!pa.isEmpty() ) | ||
58 | m_dir = pa; | ||
59 | |||
55 | QString currentMimeType; | 60 | QString currentMimeType; |
56 | QDir dir( path ); | 61 | QDir dir( m_dir ); |
57 | 62 | ||
58 | dir.setSorting( view()->sorting() ); | 63 | dir.setSorting( view()->sorting() ); |
59 | dir.setFilter( view()->filter() ); | 64 | dir.setFilter( view()->filter() ); |
@@ -123,3 +128,23 @@ void OLocalLister::fileSelected( const QString& dir, const QString& file, const | |||
123 | void OLocalLister::changedDir( const QString& dir, const QString& file, const QString& ) { | 128 | void OLocalLister::changedDir( const QString& dir, const QString& file, const QString& ) { |
124 | internChangedDir( dir + "/" + file ); | 129 | internChangedDir( dir + "/" + file ); |
125 | } | 130 | } |
131 | /* | ||
132 | * assemble the the Url now | ||
133 | */ | ||
134 | QString OLocalLister::selectedName()const { | ||
135 | QString str = m_dir; | ||
136 | QString name = lineEdit(); | ||
137 | |||
138 | if ( name.isEmpty() ) | ||
139 | name = view()->currentView()->selectedName(); | ||
140 | |||
141 | str += "/" + name; | ||
142 | |||
143 | return str; | ||
144 | } | ||
145 | QStringList OLocalLister::selectedNames()const { | ||
146 | QStringList list; | ||
147 | list << selectedName(); | ||
148 | |||
149 | return list; | ||
150 | } | ||