summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistfileview.cpp14
-rw-r--r--noncore/multimedia/opieplayer2/playlistfileview.h1
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp30
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h3
4 files changed, 20 insertions, 28 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistfileview.cpp b/noncore/multimedia/opieplayer2/playlistfileview.cpp
index 0ed1061..cb16415 100644
--- a/noncore/multimedia/opieplayer2/playlistfileview.cpp
+++ b/noncore/multimedia/opieplayer2/playlistfileview.cpp
@@ -8,3 +8,4 @@
8PlayListFileView::PlayListFileView( const QString &mimeTypePattern, const QString &itemPixmapName, QWidget *parent, const char *name ) 8PlayListFileView::PlayListFileView( const QString &mimeTypePattern, const QString &itemPixmapName, QWidget *parent, const char *name )
9 : PlayListView( parent, name ), m_mimeTypePattern( mimeTypePattern ), m_itemPixmapName( itemPixmapName ), m_scannedFiles( false ) 9 : PlayListView( parent, name ), m_mimeTypePattern( mimeTypePattern ), m_itemPixmapName( itemPixmapName ), m_scannedFiles( false ),
10 m_viewPopulated( false )
10{ 11{
@@ -34,2 +35,7 @@ void PlayListFileView::scanFiles()
34 Global::findDocuments( &m_files, m_mimeTypePattern ); 35 Global::findDocuments( &m_files, m_mimeTypePattern );
36
37 if ( m_viewPopulated ) {
38 m_viewPopulated = false;
39 populateView();
40 }
35} 41}
@@ -38,2 +44,5 @@ void PlayListFileView::populateView()
38{ 44{
45 if ( m_viewPopulated )
46 return;
47
39 clear(); 48 clear();
@@ -41,2 +50,3 @@ void PlayListFileView::populateView()
41 if( !m_scannedFiles ) { 50 if( !m_scannedFiles ) {
51 m_viewPopulated = false; // avoid a recursion :)
42 scanFiles(); 52 scanFiles();
@@ -45,2 +55,4 @@ void PlayListFileView::populateView()
45 55
56 m_viewPopulated = true;
57
46 QString storage; 58 QString storage;
diff --git a/noncore/multimedia/opieplayer2/playlistfileview.h b/noncore/multimedia/opieplayer2/playlistfileview.h
index a00349e..448473e 100644
--- a/noncore/multimedia/opieplayer2/playlistfileview.h
+++ b/noncore/multimedia/opieplayer2/playlistfileview.h
@@ -28,2 +28,3 @@ private:
28 bool m_scannedFiles; 28 bool m_scannedFiles;
29 bool m_viewPopulated;
29}; 30};
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 460a0bf..eb0606d 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -153,4 +153,2 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par
153 // see which skins are installed 153 // see which skins are installed
154 audioPopulated=false;
155 videoPopulated=false;
156 populateSkinsMenu(); 154 populateSkinsMenu();
@@ -256,3 +254,3 @@ void PlayListWidget::addAllToList() {
256 if(audioView->childCount() < 1) 254 if(audioView->childCount() < 1)
257 populateAudioView(); 255 audioView->populateView();
258 } 256 }
@@ -272,3 +270,3 @@ void PlayListWidget::addAllToList() {
272 if(videoView->childCount() < 1) 270 if(videoView->childCount() < 1)
273 populateVideoView(); 271 videoView->populateView();
274 } 272 }
@@ -316,3 +314,3 @@ void PlayListWidget::addAllMusicToList() {
316 if(audioView->childCount() < 1) 314 if(audioView->childCount() < 1)
317 populateAudioView(); 315 audioView->populateView();
318 } 316 }
@@ -349,3 +347,3 @@ void PlayListWidget::addAllVideoToList() {
349 if(videoView->childCount() < 1) 347 if(videoView->childCount() < 1)
350 populateVideoView(); 348 videoView->populateView();
351 } 349 }
@@ -574,4 +572,3 @@ void PlayListWidget::tabChanged(QWidget *) {
574 { 572 {
575 // audioView->clear(); 573 audioView->populateView();
576 if(!audioPopulated) populateAudioView();
577 574
@@ -586,4 +583,3 @@ void PlayListWidget::tabChanged(QWidget *) {
586 { 583 {
587 // videoView->clear(); 584 videoView->populateView();
588 if(!videoPopulated) populateVideoView();
589 if( !tbDeletePlaylist->isHidden() ) { 585 if( !tbDeletePlaylist->isHidden() ) {
@@ -638,4 +634,2 @@ void PlayListWidget::scanForAudio() {
638 audioView->scanFiles(); 634 audioView->scanFiles();
639 audioView->scannedFiles() = true;
640 populateAudioView();
641} 635}
@@ -644,14 +638,2 @@ void PlayListWidget::scanForVideo() {
644 videoView->scanFiles(); 638 videoView->scanFiles();
645 videoView->scannedFiles() = true;
646 populateVideoView();
647}
648
649void PlayListWidget::populateAudioView() {
650 audioView->populateView();
651 audioPopulated = true;
652}
653
654void PlayListWidget::populateVideoView() {
655 videoView->populateView();
656 videoPopulated=true;
657} 639}
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h
index 58efd47..8c22f17 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.h
+++ b/noncore/multimedia/opieplayer2/playlistwidget.h
@@ -96,3 +96,2 @@ private:
96 int defaultSkinIndex; 96 int defaultSkinIndex;
97 bool audioPopulated, videoPopulated;
98 void readm3u(const QString &); 97 void readm3u(const QString &);
@@ -100,4 +99,2 @@ private:
100 void initializeStates(); 99 void initializeStates();
101 void populateAudioView();
102 void populateVideoView();
103 100