summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/iconview.cpp
Side-by-side diff
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.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index 7c8c88d..eafff1d 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -144,24 +144,25 @@ namespace {
/*
* Set up the GUI.. initialize the slave set up gui
* and also load a dir
*/
PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg )
: QVBox( wid ), m_cfg( cfg ), m_updatet( false )
{
{
QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" );
}
m_path = QDir::homeDirPath();
m_mode = 0;
+ m_internalReset = false;
QHBox *hbox = new QHBox( this );
QLabel* lbl = new QLabel( hbox );
lbl->setText( tr("View as" ) );
m_views = new QComboBox( hbox, "View As" );
m_view= new QIconView( this );
connect(m_view, SIGNAL(clicked(QIconViewItem*) ),
this, SLOT(slotClicked(QIconViewItem*)) );
connect(m_view, SIGNAL(returnPressed(QIconViewItem*)),
this, SLOT(slotClicked(QIconViewItem*)) );
@@ -354,25 +355,27 @@ void PIconView::slotTrash() {
/*
* see what views are available
*/
void PIconView::loadViews() {
ViewMap::Iterator it;
ViewMap* map = viewMap();
for ( it = map->begin(); it != map->end(); ++it )
m_views->insertItem( it.key() );
}
void PIconView::resetView() {
+ m_internalReset = true;
slotViewChanged(m_views->currentItem());
+ m_internalReset = false;
}
/*
*swicth view reloadDir and connect signals
*/
void PIconView::slotViewChanged( int i) {
if (!m_views->count() ) {
setCurrentView( 0l);
return;
}
PDirView* cur = currentView();
@@ -398,25 +401,28 @@ void PIconView::slotViewChanged( int i) {
/* connect to the signals of the lister */
PDirLister* lis = cur->dirLister();
connect(lis, SIGNAL(sig_thumbInfo(const QString&, const QString& )),
this, SLOT( slotThumbInfo(const QString&, const QString&)));
connect(lis, SIGNAL( sig_thumbNail(const QString&, const QPixmap&)),
this, SLOT(slotThumbNail(const QString&, const QPixmap&)));
connect(lis, SIGNAL(sig_start()),
this, SLOT(slotStart()));
connect(lis, SIGNAL(sig_end()) ,
this, SLOT(slotEnd()) );
- /* reload now with default Path*/
+ /* reload now with default Path
+ * but only if it isn't a reset like from setupdlg
+ */
+ if (!m_internalReset)
m_path = lis->defaultPath();
QTimer::singleShot( 0, this, SLOT(slotReloadDir()));
}
void PIconView::slotReloadDir() {
slotChangeDir( m_path );
}
/*
* add files and folders