author | llornkcor <llornkcor> | 2002-11-14 03:38:48 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-14 03:38:48 (UTC) |
commit | 8b1dd63f359c491bdcadb7e2ce39410a1d92a926 (patch) (unidiff) | |
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 | |||
@@ -547,21 +547,33 @@ void PlayListWidget::addSelected() { | |||
547 | return; | 547 | return; |
548 | break; | 548 | break; |
549 | case 1: { //audio | 549 | case 1: { //audio |
550 | filename=audioView->currentItem()->text(3); | 550 | QListViewItemIterator it( audioView ); |
551 | // d->selectedFiles->next(); | 551 | for ( ; it.current(); ++it ) { |
552 | if ( it.current()->isSelected() ) { | ||
553 | filename=it.current()->text(3); | ||
554 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | ||
555 | lnk.setFile( filename ); //sets file name | ||
556 | d->selectedFiles->addToSelection( lnk); | ||
557 | } | ||
558 | } | ||
552 | } | 559 | } |
553 | break; | 560 | break; |
554 | 561 | ||
555 | case 2: { // video | 562 | case 2: { // video |
556 | filename=videoView->currentItem()->text(3); | 563 | QListViewItemIterator it( videoView ); |
557 | // tabWidget->setCurrentPage(0); | 564 | for ( ; it.current(); ++it ) { |
565 | if ( it.current()->isSelected() ) { | ||
566 | // myFile = (*it); | ||
558 | 567 | ||
568 | filename=it.current()->text(3); | ||
569 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | ||
570 | lnk.setFile( filename ); //sets file name | ||
571 | d->selectedFiles->addToSelection( lnk); | ||
572 | } | ||
573 | } | ||
559 | } | 574 | } |
560 | break; | 575 | break; |
561 | }; | 576 | }; |
562 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | ||
563 | lnk.setFile( filename ); //sets file name | ||
564 | d->selectedFiles->addToSelection( lnk); | ||
565 | tabWidget->setCurrentPage(0); | 577 | tabWidget->setCurrentPage(0); |
566 | writeCurrentM3u(); | 578 | writeCurrentM3u(); |
567 | } | 579 | } |
@@ -996,7 +1008,7 @@ void PlayListWidget::writem3u() { | |||
996 | 1008 | ||
997 | DocLnk lnk; | 1009 | DocLnk lnk; |
998 | lnk.setFile( filename); | 1010 | lnk.setFile( filename); |
999 | // lnk.setIcon("opieplayer2/playlist2"); | 1011 | lnk.setIcon("opieplayer2/playlist2"); |
1000 | lnk.setName( name); //sets file name | 1012 | lnk.setName( name); //sets file name |
1001 | 1013 | ||
1002 | // qDebug(filename); | 1014 | // qDebug(filename); |