summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show 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.cpp26
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_lister.h1
4 files changed, 21 insertions, 13 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
@@ -239,7 +239,9 @@ void PIconView::initKeys() {
239/* 239/*
240 * change one dir up 240 * change one dir up
241 */ 241 */
242void PIconView::slotDirUp() { 242void PIconView::slotDirUp()
243{
244 if (m_path.isEmpty()) return;
243 QDir dir( m_path ); 245 QDir dir( m_path );
244 dir.cdUp(); 246 dir.cdUp();
245 slotChangeDir( dir.absPath() ); 247 slotChangeDir( dir.absPath() );
@@ -580,6 +582,8 @@ void PIconView::slotChangeMode( int mode ) {
580 m_mode = mode; 582 m_mode = mode;
581 583
582 m_cfg->writeEntry("ListViewMode", m_mode); 584 m_cfg->writeEntry("ListViewMode", m_mode);
585 /* performance! */
586 m_view->clear();
583 calculateGrid(); 587 calculateGrid();
584 slotReloadDir(); 588 slotReloadDir();
585} 589}
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
@@ -224,6 +224,7 @@ void PMainWindow::slotConfig() {
224 PDirView *view = (_it.data())(*m_cfg); 224 PDirView *view = (_it.data())(*m_cfg);
225 PInterfaceInfo *inf = view->interfaceInfo(); 225 PInterfaceInfo *inf = view->interfaceInfo();
226 QWidget *_wid = inf->configWidget( *m_cfg ); 226 QWidget *_wid = inf->configWidget( *m_cfg );
227 if (!_wid) continue;
227 _wid->reparent(wid, QPoint() ); 228 _wid->reparent(wid, QPoint() );
228 lst.insert( view, _wid ); 229 lst.insert( view, _wid );
229 wid->addTab( _wid, "fileopen", inf->name() ); 230 wid->addTab( _wid, "fileopen", inf->name() );
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
@@ -31,17 +31,17 @@ Doc_DirLister::Doc_DirLister()
31 connect( master, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)), 31 connect( master, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)),
32 this, SLOT(slotThumbNail(const QString&, const QPixmap&)) ); 32 this, SLOT(slotThumbNail(const QString&, const QPixmap&)) );
33 33
34 m_namemap.clear();
35 m_filemap.clear();
34} 36}
35 37
36QString Doc_DirLister::defaultPath()const { 38QString Doc_DirLister::defaultPath()const {
37 return ""; QPEApplication::documentDir(); 39 return ""; QPEApplication::documentDir();
38} 40}
39 41
40QString Doc_DirLister::setStartPath( const QString& path ) { 42QString Doc_DirLister::setStartPath(const QString&) {
41 m_namemap.clear();
42 m_out.clear();
43 static const QString Mtype_str("image/jpeg;image/gif;image/bmp;image/png"); 43 static const QString Mtype_str("image/jpeg;image/gif;image/bmp;image/png");
44 owarn << "Set start path" << oendl; 44 if (m_namemap.isEmpty()) {
45 DocLnkSet ds; 45 DocLnkSet ds;
46 Global::findDocuments(&ds,Mtype_str); 46 Global::findDocuments(&ds,Mtype_str);
47 QListIterator<DocLnk> dit(ds.children()); 47 QListIterator<DocLnk> dit(ds.children());
@@ -49,14 +49,13 @@ QString Doc_DirLister::setStartPath( const QString& path ) {
49 owarn << (*dit)->file() << oendl; 49 owarn << (*dit)->file() << oendl;
50 m_namemap[(*dit)->name()]=(*dit)->file(); 50 m_namemap[(*dit)->name()]=(*dit)->file();
51 m_filemap[(*dit)->file()]=(*dit)->name(); 51 m_filemap[(*dit)->file()]=(*dit)->name();
52 m_out.append((*dit)->name());
53 } 52 }
54 owarn << "Set start path end" << oendl; 53 }
55 return ""; 54 return QString::null;
56} 55}
57 56
58QString Doc_DirLister::currentPath()const { 57QString Doc_DirLister::currentPath()const {
59 return ""; 58 return QString::null;
60} 59}
61 60
62 61
@@ -65,10 +64,16 @@ QStringList Doc_DirLister::folders()const {
65} 64}
66 65
67QStringList Doc_DirLister::files()const { 66QStringList Doc_DirLister::files()const {
68 return m_out; 67 QStringList out;
68 QMap<QString,QString>::ConstIterator it;
69 for (it = m_namemap.begin();it != m_namemap.end();++it) {
70 out.append(it.key());
71 }
72 return out;
69} 73}
70 74
71void Doc_DirLister::deleteImage( const QString& ) { 75void Doc_DirLister::deleteImage( const QString& )
76{
72} 77}
73 78
74void Doc_DirLister::thumbNail( const QString& str, int w, int h) { 79void Doc_DirLister::thumbNail( const QString& str, int w, int h) {
@@ -95,7 +100,6 @@ void Doc_DirLister::imageInfo( const QString& str) {
95 return; 100 return;
96 } 101 }
97 QString fname = m_namemap[str]; 102 QString fname = m_namemap[str];
98 owarn << "Image info: " << fname << oendl;
99 SlaveMaster::self()->thumbInfo( fname ); 103 SlaveMaster::self()->thumbInfo( fname );
100} 104}
101 105
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
@@ -32,7 +32,6 @@ public:
32 32
33private: 33private:
34 QMap<QString,QString> m_namemap,m_filemap; 34 QMap<QString,QString> m_namemap,m_filemap;
35 QStringList m_out;
36protected slots: 35protected slots:
37 virtual void slotFullInfo(const QString&, const QString&); 36 virtual void slotFullInfo(const QString&, const QString&);
38 virtual void slotThumbInfo(const QString&, const QString&); 37 virtual void slotThumbInfo(const QString&, const QString&);