Diffstat (limited to 'core/multimedia/opieplayer/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index 67187f8..94567f2 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp | |||
@@ -173,44 +173,44 @@ bool PlayListSelection::first() { | |||
173 | bool PlayListSelection::last() { | 173 | bool PlayListSelection::last() { |
174 | QListViewItem *prevItem = NULL; | 174 | QListViewItem *prevItem = NULL; |
175 | QListViewItem *item = firstChild(); | 175 | QListViewItem *item = firstChild(); |
176 | while ( ( item = item->nextSibling() ) ) | 176 | while ( ( item = item->nextSibling() ) ) |
177 | prevItem = item; | 177 | prevItem = item; |
178 | if ( prevItem ) | 178 | if ( prevItem ) |
179 | setSelected( prevItem, TRUE ); | 179 | setSelected( prevItem, TRUE ); |
180 | else | 180 | else |
181 | return FALSE; | 181 | return FALSE; |
182 | ensureItemVisible( selectedItem() ); | 182 | ensureItemVisible( selectedItem() ); |
183 | return TRUE; | 183 | return TRUE; |
184 | } | 184 | } |
185 | 185 | ||
186 | void PlayListSelection::unSelect() | 186 | void PlayListSelection::unSelect() |
187 | { | 187 | { |
188 | QListViewItem *item = selectedItem(); | 188 | QListViewItem *item = selectedItem(); |
189 | setSelected( currentItem(), FALSE); | 189 | setSelected( currentItem(), FALSE); |
190 | } | 190 | } |
191 | 191 | ||
192 | void PlayListSelection::writeCurrent( Config& cfg ) { | 192 | void PlayListSelection::writeCurrent( Config& cfg ) { |
193 | cfg.setGroup("PlayList"); | 193 | cfg.setGroup("PlayList"); |
194 | QListViewItem *item = selectedItem(); | 194 | QListViewItem *item = selectedItem(); |
195 | if ( item ) | 195 | if ( item ) |
196 | cfg.writeEntry("current", item->text(0) ); | 196 | cfg.writeEntry("current", item->text(0) ); |
197 | qDebug(item->text(0)); | 197 | // qDebug(item->text(0)); |
198 | 198 | ||
199 | } | 199 | } |
200 | 200 | ||
201 | void PlayListSelection::setSelectedItem(const QString &strk ) { | 201 | void PlayListSelection::setSelectedItem(const QString &strk ) { |
202 | 202 | ||
203 | unSelect(); | 203 | unSelect(); |
204 | QListViewItemIterator it( this ); | 204 | QListViewItemIterator it( this ); |
205 | for ( ; it.current(); ++it ) { | 205 | for ( ; it.current(); ++it ) { |
206 | // qDebug( it.current()->text(0)); | 206 | // qDebug( it.current()->text(0)); |
207 | if( strk == it.current()->text(0)) { | 207 | if( strk == it.current()->text(0)) { |
208 | // qDebug( "We have a match "+strk); | 208 | // qDebug( "We have a match "+strk); |
209 | setSelected( it.current(), TRUE); | 209 | setSelected( it.current(), TRUE); |
210 | ensureItemVisible( it.current() ); | 210 | ensureItemVisible( it.current() ); |
211 | return; | 211 | return; |
212 | } | 212 | } |
213 | } | 213 | } |
214 | // setSelected( item, TRUE ); | 214 | // setSelected( item, TRUE ); |
215 | // ensureItemVisible( selectedItem() ); | 215 | // ensureItemVisible( selectedItem() ); |
216 | } | 216 | } |