summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp26
1 files changed, 20 insertions, 6 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 19c8056..3c5734e 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -682,47 +682,61 @@ void PlayListWidget::setView( char view ) {
if ( view == 'l' )
showMaximized();
else
hide();
}
void PlayListWidget::addSelected() {
qDebug("addSelected");
DocLnk lnk;
QString filename;
switch (tabWidget->currentPageIndex()) {
case 0: //playlist
return;
break;
case 1: { //audio
- filename=audioView->currentItem()->text(3);
+ 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);
+ }
+ }
+ audioView->clearSelection();
// d->selectedFiles->next();
}
break;
case 2: { // video
- filename=videoView->currentItem()->text(3);
- // tabWidget->setCurrentPage(0);
+ QListViewItemIterator it( videoView );
+ 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);
+ }
+ }
+ videoView->clearSelection();
}
break;
};
- lnk.setName( fullBaseName ( QFileInfo(filename))); //sets name
- lnk.setFile( filename ); //sets file name
- d->selectedFiles->addToSelection( lnk);
tabWidget->setCurrentPage(0);
writeCurrentM3u();
}
void PlayListWidget::removeSelected() {
d->selectedFiles->removeSelected( );
}
void PlayListWidget::playIt( QListViewItem *) {
// d->setDocumentUsed = FALSE;
// mediaPlayerState->curPosition =0;
qDebug("playIt");
mediaPlayerState->setPlaying(FALSE);
mediaPlayerState->setPlaying(TRUE);
d->selectedFiles->unSelect();