Diffstat (limited to 'noncore/graphics/opie-eye/gui') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/gui.pro | 15 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 23 |
2 files changed, 28 insertions, 10 deletions
diff --git a/noncore/graphics/opie-eye/gui/gui.pro b/noncore/graphics/opie-eye/gui/gui.pro new file mode 100644 index 0000000..b9f0bf8 --- a/dev/null +++ b/noncore/graphics/opie-eye/gui/gui.pro @@ -0,0 +1,15 @@ +HEADERS += gui/filesystem.h \ + gui/iconview.h \ + gui/imageinfoui.h \ + gui/imageview.h \ + gui/mainwindow.h \ + gui/viewmodebutton.h + +SOURCES += gui/filesystem.cpp \ + gui/iconview.cpp \ + gui/imageinfoui.cpp \ + gui/imageview.cpp \ + gui/mainwindow.cpp \ + gui/viewmodebutton.cpp + + 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 @@ -38,13 +38,12 @@ using Opie::Core::OKeyConfigItem; /* * The Icons, Request Cache and IconViewItem for the IconView */ namespace { static QPixmap* _dirPix = 0; static QPixmap* _unkPix = 0; - static QPixmap* _picPix = 0; static QPixmap* _emptyPix = 0; class IconViewItem : public QIconViewItem { public: IconViewItem( QIconView*, const QString& path, const QString& name, bool isDir = false); QPixmap* pixmap()const; QString path()const { return m_path; } @@ -95,18 +94,18 @@ namespace { if ( isDir && !_dirPix ) _dirPix = new QPixmap( Resource::loadPixmap("advancedfm/FileBrowser")); else if ( !isDir && !_unkPix ) _unkPix = new QPixmap( Resource::loadPixmap( "UnknownDocument" ) ); } - inline void IconViewItem::setPixmap( const QPixmap & icon, bool recalc, bool redraw) + inline void IconViewItem::setPixmap( const QPixmap & , bool, bool ) { m_Pixset = true; calcRect(text()); } - inline void IconViewItem::setPixmap( const QPixmap & icon) + inline void IconViewItem::setPixmap( const QPixmap & ) { m_Pixset = true; calcRect(text()); } inline QPixmap* IconViewItem::pixmap()const { @@ -250,16 +249,13 @@ void PIconView::initKeys() { /* * change one dir up */ void PIconView::slotDirUp() { - if (m_path.isEmpty()) return; - QDir dir( m_path ); - dir.cdUp(); - slotChangeDir( dir.absPath() ); + slotChangeDir( currentView()->dirLister()->dirUp( m_path ) ); } /* * change the dir */ void PIconView::slotChangeDir(const QString& path) { @@ -376,17 +372,23 @@ void PIconView::slotViewChanged( int i) { } PDirView* cur = currentView(); if (cur) delete cur; QString str = m_views->text(i); ViewMap* map = viewMap(); - if (!map) {setCurrentView(0l); return;} + if (!map) { + setCurrentView(0l); + return; + } + if (map->find(str) == map->end()) { owarn << "Key not found" << oendl; - setCurrentView(0l); return; + setCurrentView(0l); + return; } + m_cfg->writeEntry("LastView",str); m_cfg->write(); cur = (*(*map)[str])(*m_cfg); setCurrentView( cur ); /* connect to the signals of the lister */ @@ -398,13 +400,14 @@ void PIconView::slotViewChanged( int i) { connect(lis, SIGNAL(sig_start()), this, SLOT(slotStart())); connect(lis, SIGNAL(sig_end()) , this, SLOT(slotEnd()) ); - /* reload now */ + /* reload now with default Path*/ + m_path = lis->defaultPath(); QTimer::singleShot( 0, this, SLOT(slotReloadDir())); } void PIconView::slotReloadDir() { slotChangeDir( m_path ); |