-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 12 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 12 |
2 files changed, 19 insertions, 5 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index 8f3711a..3c47256 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp @@ -200,2 +200,14 @@ void PlayListSelection::writeCurrent( Config& cfg ) { void PlayListSelection::setSelectedItem(const QString &strk ) { + + unSelect(); + QListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { +// qDebug( it.current()->text(0)); + if( strk == it.current()->text(0)) { +// qDebug( "We have a match "+strk); + setSelected( it.current(), TRUE); + ensureItemVisible( it.current() ); + return; + } + } // setSelected( item, TRUE ); diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 63df715..0764c01 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -321,3 +321,4 @@ void PlayListWidget::initializeStates() { setPlaylist( true); - d->selectedFiles->first(); +// d->selectedFiles->first(); + } @@ -338,2 +339,3 @@ void PlayListWidget::readConfig( Config& cfg ) { } + d->selectedFiles->setSelectedItem( currentString); // d->selectedFiles->setSelectedItem( (const QString &)currentString); @@ -353,3 +355,3 @@ void PlayListWidget::writeConfig( Config& cfg ) const { entryName.sprintf( "File%i", noOfFiles + 1 ); - qDebug(entryName); +// qDebug(entryName); cfg.writeEntry( entryName, lnk->linkFile() ); @@ -475,3 +477,3 @@ const DocLnk *PlayListWidget::current() { // this is fugly // { - qDebug("playlist"); +// qDebug("playlist"); if ( mediaPlayerState->playlist() ) { @@ -611,3 +613,3 @@ void PlayListWidget::saveList() { lnk.setName( filename); //sets file name - qDebug(filename); +// qDebug(filename); if(!lnk.writeLink()) @@ -888,3 +890,3 @@ void PlayListWidget::listDelete() { if( dit.current()->name() == file) { - qDebug(file); +// qDebug(file); LnkProperties prop( dit.current() ); |