summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmad/libmadplugin.cpp14
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp78
2 files changed, 55 insertions, 37 deletions
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.cpp b/core/multimedia/opieplayer/libmad/libmadplugin.cpp
index 6793773..7de4282 100644
--- a/core/multimedia/opieplayer/libmad/libmadplugin.cpp
+++ b/core/multimedia/opieplayer/libmad/libmadplugin.cpp
@@ -535,10 +535,10 @@ int LibMadPlugin::audioFrequency( int ) {
535int LibMadPlugin::audioSamples( int ) { 535int LibMadPlugin::audioSamples( int ) {
536 debugMsg( "LibMadPlugin::audioSamples" ); 536 debugMsg( "LibMadPlugin::audioSamples" );
537/* 537
538 long t; short t1[5]; audioReadSamples( t1, 2, 1, t, 0 ); 538 // long t; short t1[5]; audioReadSamples( t1, 2, 1, t, 0 );
539 mad_header_decode( (struct mad_header *)&d->frame.header, &d->stream ); 539// mad_header_decode( (struct mad_header *)&d->frame.header, &d->stream );
540 qDebug( "LibMadPlugin::audioSamples: %i*%i", d->frame.header.duration.seconds, d->frame.header.samplerate ); 540// qDebug( "LibMadPlugin::audioSamples: %i*%i", d->frame.header.duration.seconds, d->frame.header.samplerate );
541 return d->frame.header.duration.seconds * d->frame.header.samplerate; 541// return d->frame.header.duration.seconds * d->frame.header.samplerate;
542*/ 542
543 return 10000000; 543 return 10000000;
544} 544}
@@ -783,5 +783,5 @@ double LibMadPlugin::getTime() {
783 783
784void LibMadPlugin::printID3Tags() { 784void LibMadPlugin::printID3Tags() {
785 debugMsg( "LibMadPlugin::printID3Tags" ); 785 qDebug( "LibMadPlugin::printID3Tags" );
786 786
787 char id3v1[128 + 1]; 787 char id3v1[128 + 1];
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index ff156f8..7c76400 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -222,6 +222,7 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
222 audioView->setColumnAlignment(2, Qt::AlignRight); 222 audioView->setColumnAlignment(2, Qt::AlignRight);
223 audioView->setAllColumnsShowFocus(TRUE); 223 audioView->setAllColumnsShowFocus(TRUE);
224// audioView->setMultiSelection( TRUE ); 224
225// audioView->setSelectionMode( QListView::Extended); 225 audioView->setMultiSelection( TRUE );
226 audioView->setSelectionMode( QListView::Extended);
226 227
227 tabWidget->insertTab(aTab,tr("Audio")); 228 tabWidget->insertTab(aTab,tr("Audio"));
@@ -247,6 +248,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
247 videoView->setColumnAlignment(2, Qt::AlignRight); 248 videoView->setColumnAlignment(2, Qt::AlignRight);
248 videoView->setAllColumnsShowFocus(TRUE); 249 videoView->setAllColumnsShowFocus(TRUE);
249// videoView->setMultiSelection( TRUE ); 250 videoView->setMultiSelection( TRUE );
250// videoView->setSelectionMode( QListView::Extended); 251 videoView->setSelectionMode( QListView::Extended);
251 252
252 QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold); 253 QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold);
@@ -681,35 +682,52 @@ void PlayListWidget::addSelected() {
681 break; 682 break;
682 case 1: { //audio 683 case 1: { //audio
683 for ( int i = 0; i < noOfFiles; i++ ) { 684// QString entryName;
684 QString entryName; 685// entryName.sprintf( "File%i", i + 1 );
685 entryName.sprintf( "File%i", i + 1 ); 686// QString linkFile = cfg.readEntry( entryName );
686 QString linkFile = cfg.readEntry( entryName ); 687 QListViewItemIterator it( audioView );
687 if( DocLnk( linkFile).name() == audioView->selectedItem()->text(0) ) { 688 // iterate through all items of the listview
688 int result= QMessageBox::warning(this,tr("OpiePlayer"), 689 for ( ; it.current(); ++it ) {
689 tr("This is all ready in your playlist.\nContinue?"), 690 if ( it.current()->isSelected() ) {
690 tr("Yes"),tr("No"),0,0,1); 691 QListIterator<DocLnk> dit( files.children() );
691 if (result !=0) 692 for ( ; dit.current(); ++dit ) {
692 return; 693 if( dit.current()->name() == it.current()->text(0) ) {
693 } 694 d->selectedFiles->addToSelection( **dit );
695 }
696 }
697 audioView->setSelected( it.current(),FALSE);
698 }
694 } 699 }
695 addToSelection( audioView->selectedItem() ); 700 tabWidget->setCurrentPage(0);
696 tabWidget->setCurrentPage(1);
697 } 701 }
698 break; 702 break;
699 case 2: { // video 703 case 2: { // video
700 for ( int i = 0; i < noOfFiles; i++ ) { 704 QListViewItemIterator it( videoView );
701 QString entryName; 705 // iterate through all items of the listview
702 entryName.sprintf( "File%i", i + 1 ); 706 for ( ; it.current(); ++it ) {
703 QString linkFile = cfg.readEntry( entryName ); 707 if ( it.current()->isSelected() ) {
704 if( DocLnk( linkFile).name() == videoView->selectedItem()->text(0) ) { 708 QListIterator<DocLnk> dit( vFiles.children() );
705 int result= QMessageBox::warning(this,tr("OpiePlayer"), 709 for ( ; dit.current(); ++dit ) {
706 tr("This is all ready in your playlist.\nContinue?"), 710 if( dit.current()->name() == it.current()->text(0) ) {
707 tr("Yes"),tr("No"),0,0,1); 711 d->selectedFiles->addToSelection( **dit );
708 if (result !=0) 712 }
709 return; 713 }
710 } 714
715 videoView->setSelected( it.current(),FALSE);
716 }
711 } 717 }
712 addToSelection( videoView->selectedItem() ); 718// for ( int i = 0; i < noOfFiles; i++ ) {
713 tabWidget->setCurrentPage(2); 719// QString entryName;
720// entryName.sprintf( "File%i", i + 1 );
721// QString linkFile = cfg.readEntry( entryName );
722// if( DocLnk( linkFile).name() == videoView->selectedItem()->text(0) ) {
723// int result= QMessageBox::warning(this,tr("OpiePlayer"),
724// tr("This is all ready in your playlist.\nContinue?"),
725// tr("Yes"),tr("No"),0,0,1);
726// if (result !=0)
727// return;
728// }
729// }
730// addToSelection( videoView->selectedItem() );
731 tabWidget->setCurrentPage(0);
714 } 732 }
715 break; 733 break;