author | alwin <alwin> | 2004-11-02 17:52:41 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-11-02 17:52:41 (UTC) |
commit | ebdc2d346272bae27c867b855207993985df4450 (patch) (side-by-side diff) | |
tree | 37b4710141434e33df3873c16937a6ad6a015eb4 /noncore/graphics/opie-eye/gui/iconview.cpp | |
parent | e246d0590286f6b9b0d5d40f1a17caa78c015b21 (diff) | |
download | opie-ebdc2d346272bae27c867b855207993985df4450.zip opie-ebdc2d346272bae27c867b855207993985df4450.tar.gz opie-ebdc2d346272bae27c867b855207993985df4450.tar.bz2 |
if wanted the user may search directories recursiv
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 @@ -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,26 +401,29 @@ 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*/ - m_path = lis->defaultPath(); + /* 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 */ |