summaryrefslogtreecommitdiff
Side-by-side diff
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 )
// see which skins are installed
videoScan=false;
audioScan=false;
+ audioPopulated=false;
+ videoPopulated=false;
populateSkinsMenu();
initializeStates();
@@ -618,8 +620,8 @@ void PlayListWidget::tabChanged(QWidget *) {
break;
case 1:
{
- audioView->clear();
- populateAudioView();
+ // audioView->clear();
+ if(!audioPopulated) populateAudioView();
if( !tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->hide();
@@ -630,8 +632,8 @@ void PlayListWidget::tabChanged(QWidget *) {
break;
case 2:
{
- videoView->clear();
- populateVideoView();
+ // videoView->clear();
+ if(!videoPopulated) populateVideoView();
if( !tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->hide();
}
@@ -686,7 +688,8 @@ void PlayListWidget::scanForAudio() {
}
// Global::findDocuments( &files, "audio/*");
Global::findDocuments( &files, audioMimes);
- audioScan = TRUE;
+ audioScan = true;
+ populateAudioView();
}
void PlayListWidget::scanForVideo() {
@@ -697,7 +700,8 @@ void PlayListWidget::scanForVideo() {
delete sdit.current();
}
Global::findDocuments(&vFiles, "video/*");
- videoScan = TRUE;
+ videoScan = true;
+ populateVideoView();
}
void PlayListWidget::populateAudioView() {
@@ -734,6 +738,7 @@ void PlayListWidget::populateAudioView() {
newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) );
}
}
+ audioPopulated=true;
}
@@ -768,6 +773,7 @@ void PlayListWidget::populateVideoView() {
newItem->setPixmap(0, Resource::loadPixmap( "opieplayer2/videofile" ) );
}
}
+ 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
@@ -80,7 +80,7 @@ protected:
private:
int defaultSkinIndex;
- bool audioScan, videoScan;
+ bool audioScan, videoScan, audioPopulated, videoPopulated;
void readm3u(const QString &);
void readPls(const QString &);
void initializeStates();