-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 | |||
@@ -636,126 +636,128 @@ void PlayListWidget::addToSelection( QListViewItem *it) { | |||
636 | d->selectedFiles->addToSelection( **dit ); | 636 | d->selectedFiles->addToSelection( **dit ); |
637 | } | 637 | } |
638 | } | 638 | } |
639 | } | 639 | } |
640 | break; | 640 | break; |
641 | case 0: | 641 | case 0: |
642 | break; | 642 | break; |
643 | }; | 643 | }; |
644 | tabWidget->setCurrentPage(0); | 644 | tabWidget->setCurrentPage(0); |
645 | // mediaPlayerState->setPlaying( TRUE ); | 645 | // mediaPlayerState->setPlaying( TRUE ); |
646 | } | 646 | } |
647 | } | 647 | } |
648 | 648 | ||
649 | void PlayListWidget::tabChanged(QWidget *widg) { | 649 | void PlayListWidget::tabChanged(QWidget *widg) { |
650 | 650 | ||
651 | switch ( tabWidget->currentPageIndex()) { | 651 | switch ( tabWidget->currentPageIndex()) { |
652 | case 0: | 652 | case 0: |
653 | { | 653 | { |
654 | if( !tbDeletePlaylist->isHidden()) | 654 | if( !tbDeletePlaylist->isHidden()) |
655 | tbDeletePlaylist->hide(); | 655 | tbDeletePlaylist->hide(); |
656 | d->tbRemoveFromList->setEnabled(TRUE); | 656 | d->tbRemoveFromList->setEnabled(TRUE); |
657 | d->tbAddToList->setEnabled(FALSE); | 657 | d->tbAddToList->setEnabled(FALSE); |
658 | } | 658 | } |
659 | break; | 659 | break; |
660 | case 1: | 660 | case 1: |
661 | { | 661 | { |
662 | if( !tbDeletePlaylist->isHidden()) | 662 | if( !tbDeletePlaylist->isHidden()) |
663 | tbDeletePlaylist->hide(); | 663 | tbDeletePlaylist->hide(); |
664 | d->tbRemoveFromList->setEnabled(FALSE); | 664 | d->tbRemoveFromList->setEnabled(FALSE); |
665 | d->tbAddToList->setEnabled(TRUE); | 665 | d->tbAddToList->setEnabled(TRUE); |
666 | } | 666 | } |
667 | break; | 667 | break; |
668 | case 2: | 668 | case 2: |
669 | { | 669 | { |
670 | if( !tbDeletePlaylist->isHidden()) | 670 | if( !tbDeletePlaylist->isHidden()) |
671 | tbDeletePlaylist->hide(); | 671 | tbDeletePlaylist->hide(); |
672 | d->tbRemoveFromList->setEnabled(FALSE); | 672 | d->tbRemoveFromList->setEnabled(FALSE); |
673 | d->tbAddToList->setEnabled(TRUE); | 673 | d->tbAddToList->setEnabled(TRUE); |
674 | } | 674 | } |
675 | break; | 675 | break; |
676 | case 3: | 676 | case 3: |
677 | { | 677 | { |
678 | if( tbDeletePlaylist->isHidden()) | 678 | if( tbDeletePlaylist->isHidden()) |
679 | tbDeletePlaylist->show(); | 679 | tbDeletePlaylist->show(); |
680 | playLists->reread(); | 680 | playLists->reread(); |
681 | } | 681 | } |
682 | break; | 682 | break; |
683 | }; | 683 | }; |
684 | } | 684 | } |
685 | 685 | ||
686 | /* | 686 | /* |
687 | list is right clicked*/ | 687 | list is right clicked*/ |
688 | void PlayListWidget::fauxPlay(QListViewItem *it) { | 688 | void PlayListWidget::fauxPlay(QListViewItem *it) { |
689 | 689 | ||
690 | switch (tabWidget->currentPageIndex()) { | 690 | switch (tabWidget->currentPageIndex()) { |
691 | case 0: //playlist | 691 | case 0: //playlist |
692 | break; | 692 | break; |
693 | case 1: { //audio | 693 | case 1: { //audio |
694 | QListIterator<DocLnk> dit( files.children() ); | 694 | QListIterator<DocLnk> dit( files.children() ); |
695 | for ( ; dit.current(); ++dit ) { | 695 | for ( ; dit.current(); ++dit ) { |
696 | // qDebug(dit.current()->name()); | 696 | // qDebug(dit.current()->name()); |
697 | if( dit.current()->name() == it->text(0)) { | 697 | if( dit.current()->name() == it->text(0)) { |
698 | d->selectedFiles->addToSelection( **dit ); | 698 | d->selectedFiles->addToSelection( **dit ); |
699 | } | 699 | } |
700 | } | 700 | } |
701 | } | 701 | } |
702 | break; | 702 | break; |
703 | case 2: { // video | 703 | case 2: { // video |
704 | QListIterator<DocLnk> dit( vFiles.children() ); | 704 | QListIterator<DocLnk> dit( vFiles.children() ); |
705 | for ( ; dit.current(); ++dit ) { | 705 | for ( ; dit.current(); ++dit ) { |
706 | // qDebug(dit.current()->name()); | 706 | // qDebug(dit.current()->name()); |
707 | if( dit.current()->name() == it->text(0)) { | 707 | if( dit.current()->name() == it->text(0)) { |
708 | d->selectedFiles->addToSelection( **dit ); | 708 | d->selectedFiles->addToSelection( **dit ); |
709 | } | 709 | } |
710 | } | 710 | } |
711 | } | 711 | } |
712 | break; | 712 | break; |
713 | }; | 713 | }; |
714 | mediaPlayerState->setPlaying( TRUE ); | 714 | mediaPlayerState->setPlaying( TRUE ); |
715 | // tabWidget->setCurrentPage(0); | 715 | // tabWidget->setCurrentPage(0); |
716 | d->selectedFiles->removeSelected(); | 716 | d->selectedFiles->removeSelected(); |
717 | } | 717 | } |
718 | 718 | ||
719 | /* | 719 | /* |
720 | play button is pressed*/ | 720 | play button is pressed*/ |
721 | void PlayListWidget::btnPlay(bool b) { // this is fugly | 721 | void PlayListWidget::btnPlay(bool b) { // this is fugly |
722 | switch ( tabWidget->currentPageIndex()) { | 722 | switch ( tabWidget->currentPageIndex()) { |
723 | case 0: | 723 | case 0: |
724 | { | 724 | { |
725 | mediaPlayerState->setPlaying(b); | 725 | mediaPlayerState->setPlaying(b); |
726 | } | 726 | } |
727 | break; | 727 | break; |
728 | case 1: | 728 | case 1: |
729 | { | 729 | { |
730 | addToSelection( audioView->selectedItem() ); | 730 | addToSelection( audioView->selectedItem() ); |
731 | mediaPlayerState->setPlaying(b); | 731 | mediaPlayerState->setPlaying(b); |
732 | qApp->processEvents(); | ||
732 | d->selectedFiles->removeSelected( ); | 733 | d->selectedFiles->removeSelected( ); |
733 | tabWidget->setCurrentPage(1); | 734 | tabWidget->setCurrentPage(1); |
734 | } | 735 | } |
735 | break; | 736 | break; |
736 | case 2: | 737 | case 2: |
737 | { | 738 | { |
738 | addToSelection( videoView->selectedItem() ); | 739 | addToSelection( videoView->selectedItem() ); |
739 | mediaPlayerState->setPlaying(b); | 740 | mediaPlayerState->setPlaying(b); |
741 | qApp->processEvents(); | ||
740 | d->selectedFiles->removeSelected( ); | 742 | d->selectedFiles->removeSelected( ); |
741 | tabWidget->setCurrentPage(2); | 743 | tabWidget->setCurrentPage(2); |
742 | } | 744 | } |
743 | break; | 745 | break; |
744 | }; | 746 | }; |
745 | 747 | ||
746 | } | 748 | } |
747 | 749 | ||
748 | void PlayListWidget::deletePlaylist() { | 750 | void PlayListWidget::deletePlaylist() { |
749 | switch( QMessageBox::information( this, (tr("Remove Playlist?")), | 751 | switch( QMessageBox::information( this, (tr("Remove Playlist?")), |
750 | (tr("You really want to delete\nthis playlist?")), | 752 | (tr("You really want to delete\nthis playlist?")), |
751 | (tr("Yes")), (tr("No")), 0 )){ | 753 | (tr("Yes")), (tr("No")), 0 )){ |
752 | case 0: // Yes clicked, | 754 | case 0: // Yes clicked, |
753 | QFile().remove(playLists->selected()->file()); | 755 | QFile().remove(playLists->selected()->file()); |
754 | QFile().remove(playLists->selected()->linkFile()); | 756 | QFile().remove(playLists->selected()->linkFile()); |
755 | playLists->reread(); | 757 | playLists->reread(); |
756 | break; | 758 | break; |
757 | case 1: // Cancel | 759 | case 1: // Cancel |
758 | break; | 760 | break; |
759 | }; | 761 | }; |
760 | 762 | ||
761 | } | 763 | } |