summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp18
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h2
2 files changed, 13 insertions, 7 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index c2b5c77..6bedb57 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -156,6 +156,8 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
156 // see which skins are installed 156 // see which skins are installed
157 videoScan=false; 157 videoScan=false;
158 audioScan=false; 158 audioScan=false;
159 audioPopulated=false;
160 videoPopulated=false;
159 populateSkinsMenu(); 161 populateSkinsMenu();
160 initializeStates(); 162 initializeStates();
161 163
@@ -618,8 +620,8 @@ void PlayListWidget::tabChanged(QWidget *) {
618 break; 620 break;
619 case 1: 621 case 1:
620 { 622 {
621 audioView->clear(); 623 // audioView->clear();
622 populateAudioView(); 624 if(!audioPopulated) populateAudioView();
623 625
624 if( !tbDeletePlaylist->isHidden() ) { 626 if( !tbDeletePlaylist->isHidden() ) {
625 tbDeletePlaylist->hide(); 627 tbDeletePlaylist->hide();
@@ -630,8 +632,8 @@ void PlayListWidget::tabChanged(QWidget *) {
630 break; 632 break;
631 case 2: 633 case 2:
632 { 634 {
633 videoView->clear(); 635 // videoView->clear();
634 populateVideoView(); 636 if(!videoPopulated) populateVideoView();
635 if( !tbDeletePlaylist->isHidden() ) { 637 if( !tbDeletePlaylist->isHidden() ) {
636 tbDeletePlaylist->hide(); 638 tbDeletePlaylist->hide();
637 } 639 }
@@ -686,7 +688,8 @@ void PlayListWidget::scanForAudio() {
686 } 688 }
687// Global::findDocuments( &files, "audio/*"); 689// Global::findDocuments( &files, "audio/*");
688 Global::findDocuments( &files, audioMimes); 690 Global::findDocuments( &files, audioMimes);
689 audioScan = TRUE; 691 audioScan = true;
692 populateAudioView();
690} 693}
691 694
692void PlayListWidget::scanForVideo() { 695void PlayListWidget::scanForVideo() {
@@ -697,7 +700,8 @@ void PlayListWidget::scanForVideo() {
697 delete sdit.current(); 700 delete sdit.current();
698 } 701 }
699 Global::findDocuments(&vFiles, "video/*"); 702 Global::findDocuments(&vFiles, "video/*");
700 videoScan = TRUE; 703 videoScan = true;
704 populateVideoView();
701} 705}
702 706
703void PlayListWidget::populateAudioView() { 707void PlayListWidget::populateAudioView() {
@@ -734,6 +738,7 @@ void PlayListWidget::populateAudioView() {
734 newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) ); 738 newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) );
735 } 739 }
736 } 740 }
741 audioPopulated=true;
737} 742}
738 743
739 744
@@ -768,6 +773,7 @@ void PlayListWidget::populateVideoView() {
768 newItem->setPixmap(0, Resource::loadPixmap( "opieplayer2/videofile" ) ); 773 newItem->setPixmap(0, Resource::loadPixmap( "opieplayer2/videofile" ) );
769 } 774 }
770 } 775 }
776 videoPopulated=true;
771} 777}
772 778
773 779
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h
index 53be7a7..b2c389e 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.h
+++ b/noncore/multimedia/opieplayer2/playlistwidget.h
@@ -80,7 +80,7 @@ protected:
80 80
81private: 81private:
82 int defaultSkinIndex; 82 int defaultSkinIndex;
83 bool audioScan, videoScan; 83 bool audioScan, videoScan, audioPopulated, videoPopulated;
84 void readm3u(const QString &); 84 void readm3u(const QString &);
85 void readPls(const QString &); 85 void readPls(const QString &);
86 void initializeStates(); 86 void initializeStates();