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.cpp | 10 |
1 files changed, 8 insertions, 2 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 | |||
@@ -150,12 +150,13 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) | |||
150 | { | 150 | { |
151 | { | 151 | { |
152 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); | 152 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); |
153 | } | 153 | } |
154 | m_path = QDir::homeDirPath(); | 154 | m_path = QDir::homeDirPath(); |
155 | m_mode = 0; | 155 | m_mode = 0; |
156 | m_internalReset = false; | ||
156 | 157 | ||
157 | QHBox *hbox = new QHBox( this ); | 158 | QHBox *hbox = new QHBox( this ); |
158 | QLabel* lbl = new QLabel( hbox ); | 159 | QLabel* lbl = new QLabel( hbox ); |
159 | lbl->setText( tr("View as" ) ); | 160 | lbl->setText( tr("View as" ) ); |
160 | 161 | ||
161 | m_views = new QComboBox( hbox, "View As" ); | 162 | m_views = new QComboBox( hbox, "View As" ); |
@@ -360,13 +361,15 @@ void PIconView::loadViews() { | |||
360 | ViewMap* map = viewMap(); | 361 | ViewMap* map = viewMap(); |
361 | for ( it = map->begin(); it != map->end(); ++it ) | 362 | for ( it = map->begin(); it != map->end(); ++it ) |
362 | m_views->insertItem( it.key() ); | 363 | m_views->insertItem( it.key() ); |
363 | } | 364 | } |
364 | 365 | ||
365 | void PIconView::resetView() { | 366 | void PIconView::resetView() { |
367 | m_internalReset = true; | ||
366 | slotViewChanged(m_views->currentItem()); | 368 | slotViewChanged(m_views->currentItem()); |
369 | m_internalReset = false; | ||
367 | } | 370 | } |
368 | 371 | ||
369 | /* | 372 | /* |
370 | *swicth view reloadDir and connect signals | 373 | *swicth view reloadDir and connect signals |
371 | */ | 374 | */ |
372 | void PIconView::slotViewChanged( int i) { | 375 | void PIconView::slotViewChanged( int i) { |
@@ -404,14 +407,17 @@ void PIconView::slotViewChanged( int i) { | |||
404 | connect(lis, SIGNAL(sig_start()), | 407 | connect(lis, SIGNAL(sig_start()), |
405 | this, SLOT(slotStart())); | 408 | this, SLOT(slotStart())); |
406 | connect(lis, SIGNAL(sig_end()) , | 409 | connect(lis, SIGNAL(sig_end()) , |
407 | this, SLOT(slotEnd()) ); | 410 | this, SLOT(slotEnd()) ); |
408 | 411 | ||
409 | 412 | ||
410 | /* reload now with default Path*/ | 413 | /* reload now with default Path |
411 | m_path = lis->defaultPath(); | 414 | * but only if it isn't a reset like from setupdlg |
415 | */ | ||
416 | if (!m_internalReset) | ||
417 | m_path = lis->defaultPath(); | ||
412 | QTimer::singleShot( 0, this, SLOT(slotReloadDir())); | 418 | QTimer::singleShot( 0, this, SLOT(slotReloadDir())); |
413 | } | 419 | } |
414 | 420 | ||
415 | 421 | ||
416 | void PIconView::slotReloadDir() { | 422 | void PIconView::slotReloadDir() { |
417 | slotChangeDir( m_path ); | 423 | slotChangeDir( m_path ); |