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 @@ #include "ofileselector.h" +#include "ofileview.h" #include "olocallister.h" @@ -12,2 +13,3 @@ OLocalLister::OLocalLister( OFileSelector* file ) { + m_dir = QDir::homeDirPath(); } @@ -53,5 +55,8 @@ QMap<QString, QStringList> OLocalLister::mimeTypes( const QString& curDir ) { */ -void OLocalLister::reparse( const QString& path ) { +void OLocalLister::reparse( const QString& pa ) { + if (!pa.isEmpty() ) + m_dir = pa; + QString currentMimeType; - QDir dir( path ); + QDir dir( m_dir ); @@ -125 +130,21 @@ void OLocalLister::changedDir( const QString& dir, const QString& file, const QS } +/* + * assemble the the Url now + */ +QString OLocalLister::selectedName()const { + QString str = m_dir; + QString name = lineEdit(); + + if ( name.isEmpty() ) + name = view()->currentView()->selectedName(); + + str += "/" + name; + + return str; +} +QStringList OLocalLister::selectedNames()const { + QStringList list; + list << selectedName(); + + return list; +} |