Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 652acc9..7196aba 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp | |||
@@ -42,5 +42,4 @@ namespace { | |||
42 | static QPixmap* _dirPix = 0; | 42 | static QPixmap* _dirPix = 0; |
43 | static QPixmap* _unkPix = 0; | 43 | static QPixmap* _unkPix = 0; |
44 | static QPixmap* _picPix = 0; | ||
45 | static QPixmap* _emptyPix = 0; | 44 | static QPixmap* _emptyPix = 0; |
46 | class IconViewItem : public QIconViewItem { | 45 | class IconViewItem : public QIconViewItem { |
@@ -99,10 +98,10 @@ namespace { | |||
99 | } | 98 | } |
100 | 99 | ||
101 | inline void IconViewItem::setPixmap( const QPixmap & icon, bool recalc, bool redraw) | 100 | inline void IconViewItem::setPixmap( const QPixmap & , bool, bool ) |
102 | { | 101 | { |
103 | m_Pixset = true; | 102 | m_Pixset = true; |
104 | calcRect(text()); | 103 | calcRect(text()); |
105 | } | 104 | } |
106 | inline void IconViewItem::setPixmap( const QPixmap & icon) | 105 | inline void IconViewItem::setPixmap( const QPixmap & ) |
107 | { | 106 | { |
108 | m_Pixset = true; | 107 | m_Pixset = true; |
@@ -254,8 +253,5 @@ void PIconView::initKeys() { | |||
254 | void PIconView::slotDirUp() | 253 | void PIconView::slotDirUp() |
255 | { | 254 | { |
256 | if (m_path.isEmpty()) return; | 255 | slotChangeDir( currentView()->dirLister()->dirUp( m_path ) ); |
257 | QDir dir( m_path ); | ||
258 | dir.cdUp(); | ||
259 | slotChangeDir( dir.absPath() ); | ||
260 | } | 256 | } |
261 | 257 | ||
@@ -380,9 +376,15 @@ void PIconView::slotViewChanged( int i) { | |||
380 | QString str = m_views->text(i); | 376 | QString str = m_views->text(i); |
381 | ViewMap* map = viewMap(); | 377 | ViewMap* map = viewMap(); |
382 | if (!map) {setCurrentView(0l); return;} | 378 | if (!map) { |
379 | setCurrentView(0l); | ||
380 | return; | ||
381 | } | ||
382 | |||
383 | if (map->find(str) == map->end()) { | 383 | if (map->find(str) == map->end()) { |
384 | owarn << "Key not found" << oendl; | 384 | owarn << "Key not found" << oendl; |
385 | setCurrentView(0l); return; | 385 | setCurrentView(0l); |
386 | return; | ||
386 | } | 387 | } |
388 | |||
387 | m_cfg->writeEntry("LastView",str); | 389 | m_cfg->writeEntry("LastView",str); |
388 | m_cfg->write(); | 390 | m_cfg->write(); |
@@ -402,5 +404,6 @@ void PIconView::slotViewChanged( int i) { | |||
402 | 404 | ||
403 | 405 | ||
404 | /* reload now */ | 406 | /* reload now with default Path*/ |
407 | m_path = lis->defaultPath(); | ||
405 | QTimer::singleShot( 0, this, SLOT(slotReloadDir())); | 408 | QTimer::singleShot( 0, this, SLOT(slotReloadDir())); |
406 | } | 409 | } |