summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/iconview.cpp
Unidiff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index 660c4fa..087db30 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -347,3 +347,3 @@ void PIconView::loadViews() {
347 for ( it = map->begin(); it != map->end(); ++it ) 347 for ( it = map->begin(); it != map->end(); ++it )
348 m_views->insertItem( QObject::tr(it.key() ) ); 348 m_views->insertItem( it.key() );
349} 349}
@@ -364,5 +364,11 @@ void PIconView::slotViewChanged( int i) {
364 PDirView* cur = currentView(); 364 PDirView* cur = currentView();
365 delete cur; 365 if (cur) delete cur;
366 QString str = m_views->text(i); 366 QString str = m_views->text(i);
367 cur = (*(*viewMap())[str])(*m_cfg); 367 ViewMap* map = viewMap();
368 if (!map) {setCurrentView(0l); return;}
369 if (map->find(str) == map->end()) {
370 owarn << "Key not found" << oendl;
371 setCurrentView(0l); return;
372 }
373 cur = (*(*map)[str])(*m_cfg);
368 setCurrentView( cur ); 374 setCurrentView( cur );
@@ -408,5 +414,9 @@ void PIconView::addFiles( const QStringList& lst) {
408 QPixmap*m_pix = 0; 414 QPixmap*m_pix = 0;
415 QString pre = "";
416 if (!m_path.isEmpty()) {
417 pre = m_path+"/";
418 }
409 for (it=lst.begin(); it!= lst.end(); ++it ) { 419 for (it=lst.begin(); it!= lst.end(); ++it ) {
410 m_pix = PPixmapCache::self()->cachedImage( m_path+"/"+(*it), 64, 64 ); 420 m_pix = PPixmapCache::self()->cachedImage( pre+(*it), 64, 64 );
411 _iv = new IconViewItem( m_view, m_path+"/"+(*it), (*it) ); 421 _iv = new IconViewItem( m_view, pre+(*it), (*it) );
412 if (m_mode==3) { 422 if (m_mode==3) {
@@ -545,3 +555,2 @@ void PIconView::slotShowImage()
545 if (isDir) return; 555 if (isDir) return;
546
547 slotShowImage( name ); 556 slotShowImage( name );
@@ -549,3 +558,5 @@ void PIconView::slotShowImage()
549void PIconView::slotShowImage( const QString& name) { 558void PIconView::slotShowImage( const QString& name) {
550 emit sig_display( name ); 559 PDirLister *lister = currentView()->dirLister();
560 QString r_name = lister->nameToFname(name);
561 emit sig_display( r_name );
551} 562}
@@ -560,3 +571,5 @@ void PIconView::slotImageInfo() {
560void PIconView::slotImageInfo( const QString& name) { 571void PIconView::slotImageInfo( const QString& name) {
561 emit sig_showInfo( name ); 572 PDirLister *lister = currentView()->dirLister();
573 QString r_name = lister->nameToFname(name);
574 emit sig_showInfo(r_name );
562} 575}
@@ -581,4 +594,2 @@ void PIconView::resizeEvent( QResizeEvent* re ) {
581void PIconView::calculateGrid() { 594void PIconView::calculateGrid() {
582 odebug << "Calc grid: x=" << m_view->gridX() << " y=" << m_view->gridY() << oendl;
583 odebug << "Size of view: " << m_view->size() << oendl;
584 int dw = QApplication::desktop()->width(); 595 int dw = QApplication::desktop()->width();