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 | |||
@@ -6,4 +6,5 @@ | |||
6 | 6 | ||
7 | #include "ofileselector.h" | 7 | #include "ofileselector.h" |
8 | #include "ofileview.h" | ||
8 | #include "olocallister.h" | 9 | #include "olocallister.h" |
9 | 10 | ||
@@ -11,4 +12,5 @@ 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() { |
@@ -52,7 +54,10 @@ QMap<QString, QStringList> OLocalLister::mimeTypes( const QString& curDir ) { | |||
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() ); |
@@ -124,2 +129,22 @@ void OLocalLister::changedDir( const QString& dir, const QString& file, const QS | |||
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 | } | ||