author | llornkcor <llornkcor> | 2002-11-14 03:38:48 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-14 03:38:48 (UTC) |
commit | 8b1dd63f359c491bdcadb7e2ce39410a1d92a926 (patch) (side-by-side diff) | |
tree | b260127fd6b123a57f42e76ce4c2ea4051cd83cd | |
parent | 5250e8571646f422a0830adcb137df8332ec0fe7 (diff) | |
download | opie-8b1dd63f359c491bdcadb7e2ce39410a1d92a926.zip opie-8b1dd63f359c491bdcadb7e2ce39410a1d92a926.tar.gz opie-8b1dd63f359c491bdcadb7e2ce39410a1d92a926.tar.bz2 |
fix multiselect addto playlist
-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 @@ -546,23 +546,35 @@ void PlayListWidget::addSelected() { case 0: //playlist return; 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(); } @@ -995,9 +1007,9 @@ void PlayListWidget::writem3u() { if(fileDlg) delete fileDlg; DocLnk lnk; lnk.setFile( filename); -// lnk.setIcon("opieplayer2/playlist2"); + lnk.setIcon("opieplayer2/playlist2"); lnk.setName( name); //sets file name // qDebug(filename); Config config( "OpiePlayer" ); |