Diffstat (limited to 'libopie/ofileselector/olocallister.cpp') (more/less context) (ignore 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 | |||
@@ -7,2 +7,3 @@ | |||
7 | #include "ofileselector.h" | 7 | #include "ofileselector.h" |
8 | #include "ofileview.h" | ||
8 | #include "olocallister.h" | 9 | #include "olocallister.h" |
@@ -12,2 +13,3 @@ OLocalLister::OLocalLister( OFileSelector* file ) | |||
12 | { | 13 | { |
14 | m_dir = QDir::homeDirPath(); | ||
13 | } | 15 | } |
@@ -53,5 +55,8 @@ QMap<QString, QStringList> OLocalLister::mimeTypes( const QString& curDir ) { | |||
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 | ||
@@ -125 +130,21 @@ void OLocalLister::changedDir( const QString& dir, const QString& file, const QS | |||
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 | } | ||