From 69df55bd0b74c7e59ff40390e2f1d902f882491f Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 24 Jul 2004 18:46:24 +0000 Subject: Try to get the Keyup Event inside the IconView to not 'move' forward later. Long Return press triggers autorepeat --- diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 211314b..652acc9 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp @@ -438,6 +438,9 @@ void PIconView::addFiles( const QStringList& lst) { if (m_mode==3) { _iv->setTextOnly(true); _iv->setPixmap(QPixmap()); + + + } else { if (m_pix) _iv->setPixmap(*m_pix); } @@ -460,6 +463,22 @@ void PIconView::slotClicked(QIconViewItem* _it) { } /* + * Return was pressed. which is triggered by the keydown + * handler. The problem is that the key up will be handled + * by the ImageDisplayer and goes to the next image + */ +void PIconView::slotRetrun( QIconViewItem *_it ) { + if(!_it ) + return; + + IconViewItem* it = static_cast(_it); + if( it->isDir() ) + slotChangeDir( it->path() ); + else + QTimer::singleShot(0, this, SLOT(slotShowImage()) ); +} + +/* * got thumb info add to the cache if items is visible * we later need update after processing of slave is done */ diff --git a/noncore/graphics/opie-eye/gui/iconview.h b/noncore/graphics/opie-eye/gui/iconview.h index 14ad168..a424c5c 100644 --- a/noncore/graphics/opie-eye/gui/iconview.h +++ b/noncore/graphics/opie-eye/gui/iconview.h @@ -76,6 +76,7 @@ private slots: void addFolders( const QStringList& ); void addFiles( const QStringList& ); void slotClicked(QIconViewItem* ); + void slotRetrun(QIconViewItem* ); /**/ void slotThumbInfo(const QString&, const QString&); -- cgit v0.9.0.2