-rw-r--r-- | noncore/graphics/opie-eye/impl/doc/doc_lister.cpp | 11 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/impl/doc/doc_lister.h | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp index d60149f..e43baed 100644 --- a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp +++ b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp @@ -35,12 +35,13 @@ Doc_DirLister::Doc_DirLister() this, SLOT(slotFullInfo(const QString&, const QString&)) ); connect( master, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)), this, SLOT(slotThumbNail(const QString&, const QPixmap&)) ); m_namemap.clear(); m_filemap.clear(); + m_docreads = false; } QString Doc_DirLister::defaultPath()const { return QString::null; } @@ -53,17 +54,19 @@ bool Doc_DirLister::matchCat(const AppLnk* app) return false; } QString Doc_DirLister::setStartPath(const QString&) { static const QString Mtype_str("image/jpeg;image/gif;image/bmp;image/png"); if (m_namemap.isEmpty()) { - DocLnkSet ds; - Global::findDocuments(&ds,Mtype_str); - QListIterator<DocLnk> dit(ds.children()); + if (!m_docreads) { + Global::findDocuments(&m_ds,Mtype_str); + m_docreads = true; + } + QListIterator<DocLnk> dit(m_ds.children()); for( ; dit.current(); ++dit) { - if (! (*dit)->isValid()) continue; +// if (! (*dit)->isValid()) continue; if (!matchCat((*dit))) continue; m_namemap[(*dit)->name()]=(*dit)->file(); m_filemap[(*dit)->file()]=(*dit)->name(); } } return QString::null; diff --git a/noncore/graphics/opie-eye/impl/doc/doc_lister.h b/noncore/graphics/opie-eye/impl/doc/doc_lister.h index e148ac0..403241c 100644 --- a/noncore/graphics/opie-eye/impl/doc/doc_lister.h +++ b/noncore/graphics/opie-eye/impl/doc/doc_lister.h @@ -4,12 +4,14 @@ #ifndef DOC_LISTER_INTERFACE_LISTER_H #define DOC_LISTER_INTERFACE_LISTER_H #include <iface/dirlister.h> +#include <qpe/applnk.h> + #include <qstring.h> #include <qmap.h> class Config; class AppLnk; @@ -35,12 +37,14 @@ public: QWidget* widget(QWidget*parent); private: QMap<QString,QString> m_namemap,m_filemap; int m_catFilter; bool matchCat(const AppLnk* app); + bool m_docreads; + DocLnkSet m_ds; protected slots: virtual void slotFullInfo(const QString&, const QString&); virtual void slotThumbInfo(const QString&, const QString&); virtual void slotThumbNail(const QString&, const QPixmap&); virtual void showCategory(int); |