-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 @@ -549,4 +549,11 @@ void PlayListWidget::addSelected() { 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); + } + } } @@ -555,5 +562,13 @@ void PlayListWidget::addSelected() { 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); + } + } } @@ -561,5 +576,2 @@ void PlayListWidget::addSelected() { }; - lnk.setName( QFileInfo(filename).baseName() ); //sets name - lnk.setFile( filename ); //sets file name - d->selectedFiles->addToSelection( lnk); tabWidget->setCurrentPage(0); @@ -998,3 +1010,3 @@ void PlayListWidget::writem3u() { lnk.setFile( filename); -// lnk.setIcon("opieplayer2/playlist2"); + lnk.setIcon("opieplayer2/playlist2"); lnk.setName( name); //sets file name |