-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index ae03ec8..de36551 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -668,94 +668,96 @@ void PlayListWidget::tabChanged(QWidget *widg) { case 2: { if( !tbDeletePlaylist->isHidden()) tbDeletePlaylist->hide(); d->tbRemoveFromList->setEnabled(FALSE); d->tbAddToList->setEnabled(TRUE); } break; case 3: { if( tbDeletePlaylist->isHidden()) tbDeletePlaylist->show(); playLists->reread(); } break; }; } /* list is right clicked*/ void PlayListWidget::fauxPlay(QListViewItem *it) { switch (tabWidget->currentPageIndex()) { case 0: //playlist break; case 1: { //audio QListIterator<DocLnk> dit( files.children() ); for ( ; dit.current(); ++dit ) { // qDebug(dit.current()->name()); if( dit.current()->name() == it->text(0)) { d->selectedFiles->addToSelection( **dit ); } } } break; case 2: { // video QListIterator<DocLnk> dit( vFiles.children() ); for ( ; dit.current(); ++dit ) { // qDebug(dit.current()->name()); if( dit.current()->name() == it->text(0)) { d->selectedFiles->addToSelection( **dit ); } } } break; }; mediaPlayerState->setPlaying( TRUE ); // tabWidget->setCurrentPage(0); d->selectedFiles->removeSelected(); } /* play button is pressed*/ void PlayListWidget::btnPlay(bool b) { // this is fugly switch ( tabWidget->currentPageIndex()) { case 0: { mediaPlayerState->setPlaying(b); } break; case 1: { addToSelection( audioView->selectedItem() ); mediaPlayerState->setPlaying(b); + qApp->processEvents(); d->selectedFiles->removeSelected( ); tabWidget->setCurrentPage(1); } break; case 2: { addToSelection( videoView->selectedItem() ); mediaPlayerState->setPlaying(b); + qApp->processEvents(); d->selectedFiles->removeSelected( ); tabWidget->setCurrentPage(2); } break; }; } void PlayListWidget::deletePlaylist() { switch( QMessageBox::information( this, (tr("Remove Playlist?")), (tr("You really want to delete\nthis playlist?")), (tr("Yes")), (tr("No")), 0 )){ case 0: // Yes clicked, QFile().remove(playLists->selected()->file()); QFile().remove(playLists->selected()->linkFile()); playLists->reread(); break; case 1: // Cancel break; }; } |