summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp6
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp1
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_lister.cpp40
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_lister.h1
4 files changed, 28 insertions, 20 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index 087db30..77597d2 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -241,3 +241,5 @@ void PIconView::initKeys() {
*/
-void PIconView::slotDirUp() {
+void PIconView::slotDirUp()
+{
+ if (m_path.isEmpty()) return;
QDir dir( m_path );
@@ -582,2 +584,4 @@ void PIconView::slotChangeMode( int mode ) {
m_cfg->writeEntry("ListViewMode", m_mode);
+ /* performance! */
+ m_view->clear();
calculateGrid();
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 058fca0..ec6b051 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -226,2 +226,3 @@ void PMainWindow::slotConfig() {
QWidget *_wid = inf->configWidget( *m_cfg );
+ if (!_wid) continue;
_wid->reparent(wid, QPoint() );
diff --git a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
index f695a76..73b2863 100644
--- a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
+++ b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
@@ -33,2 +33,4 @@ Doc_DirLister::Doc_DirLister()
+ m_namemap.clear();
+ m_filemap.clear();
}
@@ -39,18 +41,15 @@ QString Doc_DirLister::defaultPath()const {
-QString Doc_DirLister::setStartPath( const QString& path ) {
- m_namemap.clear();
- m_out.clear();
+QString Doc_DirLister::setStartPath(const QString&) {
static const QString Mtype_str("image/jpeg;image/gif;image/bmp;image/png");
- owarn << "Set start path" << oendl;
- DocLnkSet ds;
- Global::findDocuments(&ds,Mtype_str);
- QListIterator<DocLnk> dit(ds.children());
- for( ; dit.current(); ++dit) {
- owarn << (*dit)->file() << oendl;
- m_namemap[(*dit)->name()]=(*dit)->file();
- m_filemap[(*dit)->file()]=(*dit)->name();
- m_out.append((*dit)->name());
+ if (m_namemap.isEmpty()) {
+ DocLnkSet ds;
+ Global::findDocuments(&ds,Mtype_str);
+ QListIterator<DocLnk> dit(ds.children());
+ for( ; dit.current(); ++dit) {
+ owarn << (*dit)->file() << oendl;
+ m_namemap[(*dit)->name()]=(*dit)->file();
+ m_filemap[(*dit)->file()]=(*dit)->name();
+ }
}
- owarn << "Set start path end" << oendl;
- return "";
+ return QString::null;
}
@@ -58,3 +57,3 @@ QString Doc_DirLister::setStartPath( const QString& path ) {
QString Doc_DirLister::currentPath()const {
- return "";
+ return QString::null;
}
@@ -67,6 +66,12 @@ QStringList Doc_DirLister::folders()const {
QStringList Doc_DirLister::files()const {
- return m_out;
+ QStringList out;
+ QMap<QString,QString>::ConstIterator it;
+ for (it = m_namemap.begin();it != m_namemap.end();++it) {
+ out.append(it.key());
+ }
+ return out;
}
-void Doc_DirLister::deleteImage( const QString& ) {
+void Doc_DirLister::deleteImage( const QString& )
+{
}
@@ -97,3 +102,2 @@ void Doc_DirLister::imageInfo( const QString& str) {
QString fname = m_namemap[str];
- owarn << "Image info: " << fname << oendl;
SlaveMaster::self()->thumbInfo( fname );
diff --git a/noncore/graphics/opie-eye/impl/doc/doc_lister.h b/noncore/graphics/opie-eye/impl/doc/doc_lister.h
index d89b579..a65b616 100644
--- a/noncore/graphics/opie-eye/impl/doc/doc_lister.h
+++ b/noncore/graphics/opie-eye/impl/doc/doc_lister.h
@@ -34,3 +34,2 @@ private:
QMap<QString,QString> m_namemap,m_filemap;
- QStringList m_out;
protected slots: