-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 18 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 2 |
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 @@ -157,4 +157,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) videoScan=false; audioScan=false; + audioPopulated=false; + videoPopulated=false; populateSkinsMenu(); initializeStates(); @@ -619,6 +621,6 @@ void PlayListWidget::tabChanged(QWidget *) { case 1: { - audioView->clear(); - populateAudioView(); + // audioView->clear(); + if(!audioPopulated) populateAudioView(); if( !tbDeletePlaylist->isHidden() ) { @@ -631,6 +633,6 @@ void PlayListWidget::tabChanged(QWidget *) { case 2: { - videoView->clear(); - populateVideoView(); + // videoView->clear(); + if(!videoPopulated) populateVideoView(); if( !tbDeletePlaylist->isHidden() ) { tbDeletePlaylist->hide(); @@ -687,5 +689,6 @@ void PlayListWidget::scanForAudio() { // Global::findDocuments( &files, "audio/*"); Global::findDocuments( &files, audioMimes); - audioScan = TRUE; + audioScan = true; + populateAudioView(); } @@ -698,5 +701,6 @@ void PlayListWidget::scanForVideo() { } Global::findDocuments(&vFiles, "video/*"); - videoScan = TRUE; + videoScan = true; + populateVideoView(); } @@ -735,4 +739,5 @@ void PlayListWidget::populateAudioView() { } } + audioPopulated=true; } @@ -769,4 +774,5 @@ void PlayListWidget::populateVideoView() { } } + videoPopulated=true; } 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 @@ -81,5 +81,5 @@ protected: private: int defaultSkinIndex; - bool audioScan, videoScan; + bool audioScan, videoScan, audioPopulated, videoPopulated; void readm3u(const QString &); void readPls(const QString &); |