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 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 0b80012..38a621e 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp | |||
@@ -84,25 +84,25 @@ namespace { | |||
84 | inline void IconViewItem::setText( const QString& str ) { | 84 | inline void IconViewItem::setText( const QString& str ) { |
85 | QString text = QIconViewItem::text()+"\n"+str; | 85 | QString text = QIconViewItem::text()+"\n"+str; |
86 | m_noInfo = true; | 86 | m_noInfo = true; |
87 | QIconViewItem::setText( text ); | 87 | QIconViewItem::setText( text ); |
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
91 | 91 | ||
92 | PIconView::PIconView( QWidget* wid, Config* cfg ) | 92 | PIconView::PIconView( QWidget* wid, Config* cfg ) |
93 | : QVBox( wid ), m_cfg( cfg ) | 93 | : QVBox( wid ), m_cfg( cfg ) |
94 | { | 94 | { |
95 | { | 95 | { |
96 | QCopEnvelope( "QPE/Application/opie-eye_slave", "foo()" ); | 96 | // QCopEnvelope( "QPE/Application/opie-eye_slave", "foo()" ); |
97 | } | 97 | } |
98 | m_path = QDir::homeDirPath(); | 98 | m_path = QDir::homeDirPath(); |
99 | 99 | ||
100 | QHBox *hbox = new QHBox( this ); | 100 | QHBox *hbox = new QHBox( this ); |
101 | QLabel* lbl = new QLabel( hbox ); | 101 | QLabel* lbl = new QLabel( hbox ); |
102 | lbl->setText( tr("View as" ) ); | 102 | lbl->setText( tr("View as" ) ); |
103 | 103 | ||
104 | m_views = new QComboBox( hbox, "View As" ); | 104 | m_views = new QComboBox( hbox, "View As" ); |
105 | connect( m_views, SIGNAL(activated(int)), | 105 | connect( m_views, SIGNAL(activated(int)), |
106 | this, SLOT(slotViewChanged(int)) ); | 106 | this, SLOT(slotViewChanged(int)) ); |
107 | 107 | ||
108 | m_view= new QIconView( this ); | 108 | m_view= new QIconView( this ); |
@@ -137,24 +137,28 @@ void PIconView::slotChangeDir(const QString& path) { | |||
137 | 137 | ||
138 | PDirLister *lister = currentView()->dirLister(); | 138 | PDirLister *lister = currentView()->dirLister(); |
139 | if (!lister ) | 139 | if (!lister ) |
140 | return; | 140 | return; |
141 | 141 | ||
142 | lister->setStartPath( path ); | 142 | lister->setStartPath( path ); |
143 | m_path = lister->currentPath(); | 143 | m_path = lister->currentPath(); |
144 | 144 | ||
145 | m_view->clear(); | 145 | m_view->clear(); |
146 | addFolders( lister->folders() ); | 146 | addFolders( lister->folders() ); |
147 | addFiles( lister->files() ); | 147 | addFiles( lister->files() ); |
148 | 148 | ||
149 | // Also invalidate the cache. We can't cancel the operations anyway | ||
150 | g_stringPix.clear(); | ||
151 | g_stringInf.clear(); | ||
152 | |||
149 | // looks ugly | 153 | // looks ugly |
150 | static_cast<QMainWindow*>(parent())->setCaption( QObject::tr("%1 - O View", "Name of the dir").arg( m_path ) ); | 154 | static_cast<QMainWindow*>(parent())->setCaption( QObject::tr("%1 - O View", "Name of the dir").arg( m_path ) ); |
151 | } | 155 | } |
152 | 156 | ||
153 | QString PIconView::currentFileName(bool &isDir)const { | 157 | QString PIconView::currentFileName(bool &isDir)const { |
154 | isDir = false; | 158 | isDir = false; |
155 | QIconViewItem* _it = m_view->currentItem(); | 159 | QIconViewItem* _it = m_view->currentItem(); |
156 | if ( !_it ) | 160 | if ( !_it ) |
157 | return QString::null; | 161 | return QString::null; |
158 | 162 | ||
159 | IconViewItem* it = static_cast<IconViewItem*>( _it ); | 163 | IconViewItem* it = static_cast<IconViewItem*>( _it ); |
160 | isDir = it->isDir(); | 164 | isDir = it->isDir(); |