-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 16467c0..ccf654f 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -548,19 +548,31 @@ void PlayListWidget::addSelected() { break; case 1: { //audio - filename=audioView->currentItem()->text(3); - // d->selectedFiles->next(); + QListViewItemIterator it( audioView ); + for ( ; it.current(); ++it ) { + if ( it.current()->isSelected() ) { + filename=it.current()->text(3); + lnk.setName( QFileInfo(filename).baseName() ); //sets name + lnk.setFile( filename ); //sets file name + d->selectedFiles->addToSelection( lnk); + } + } } break; case 2: { // video - filename=videoView->currentItem()->text(3); - // tabWidget->setCurrentPage(0); + QListViewItemIterator it( videoView ); + for ( ; it.current(); ++it ) { + if ( it.current()->isSelected() ) { + // myFile = (*it); + filename=it.current()->text(3); + lnk.setName( QFileInfo(filename).baseName() ); //sets name + lnk.setFile( filename ); //sets file name + d->selectedFiles->addToSelection( lnk); + } + } } break; }; - lnk.setName( QFileInfo(filename).baseName() ); //sets name - lnk.setFile( filename ); //sets file name - d->selectedFiles->addToSelection( lnk); tabWidget->setCurrentPage(0); writeCurrentM3u(); @@ -997,5 +1009,5 @@ void PlayListWidget::writem3u() { DocLnk lnk; lnk.setFile( filename); -// lnk.setIcon("opieplayer2/playlist2"); + lnk.setIcon("opieplayer2/playlist2"); lnk.setName( name); //sets file name |