summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistfileview.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/playlistfileview.h4
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp18
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h2
4 files changed, 14 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistfileview.cpp b/noncore/multimedia/opieplayer2/playlistfileview.cpp
index 2726296..1e2ef89 100644
--- a/noncore/multimedia/opieplayer2/playlistfileview.cpp
+++ b/noncore/multimedia/opieplayer2/playlistfileview.cpp
@@ -5,5 +5,5 @@
5 5
6PlayListFileView::PlayListFileView( const QString &mimeTypePattern, QWidget *parent, const char *name ) 6PlayListFileView::PlayListFileView( const QString &mimeTypePattern, QWidget *parent, const char *name )
7 : PlayListView( parent, name ), m_mimeTypePattern( mimeTypePattern ) 7 : PlayListView( parent, name ), m_mimeTypePattern( mimeTypePattern ), m_scannedFiles( false )
8{ 8{
9 addColumn( tr( "Title" ), 140); 9 addColumn( tr( "Title" ), 140);
diff --git a/noncore/multimedia/opieplayer2/playlistfileview.h b/noncore/multimedia/opieplayer2/playlistfileview.h
index 08db929..4e17966 100644
--- a/noncore/multimedia/opieplayer2/playlistfileview.h
+++ b/noncore/multimedia/opieplayer2/playlistfileview.h
@@ -13,5 +13,8 @@ public:
13 virtual ~PlayListFileView(); 13 virtual ~PlayListFileView();
14 14
15 // both temporarily accessible that way until the caller code has
16 // been migrated into this class
15 DocLnkSet &files() { return m_files; } 17 DocLnkSet &files() { return m_files; }
18 bool &scannedFiles() { return m_scannedFiles; }
16 19
17public slots: 20public slots:
@@ -21,4 +24,5 @@ private:
21 QString m_mimeTypePattern; 24 QString m_mimeTypePattern;
22 DocLnkSet m_files; 25 DocLnkSet m_files;
26 bool m_scannedFiles;
23}; 27};
24 28
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 93e7919..12b8a71 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -152,6 +152,4 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par
152 152
153 // see which skins are installed 153 // see which skins are installed
154 videoScan=false;
155 audioScan=false;
156 audioPopulated=false; 154 audioPopulated=false;
157 videoPopulated=false; 155 videoPopulated=false;
@@ -255,5 +253,5 @@ void PlayListWidget::addAllToList() {
255// t.start(); 253// t.start();
256 254
257 if(!audioScan) { 255 if(!audioView->scannedFiles()) {
258 if(audioView->childCount() < 1) 256 if(audioView->childCount() < 1)
259 populateAudioView(); 257 populateAudioView();
@@ -271,5 +269,5 @@ void PlayListWidget::addAllToList() {
271 } 269 }
272 270
273 if(!videoScan) { 271 if(!videoView->scannedFiles()) {
274 if(videoView->childCount() < 1) 272 if(videoView->childCount() < 1)
275 populateVideoView(); 273 populateVideoView();
@@ -315,5 +313,5 @@ void PlayListWidget::addAllToList() {
315void PlayListWidget::addAllMusicToList() { 313void PlayListWidget::addAllMusicToList() {
316 314
317 if(!audioScan) { 315 if(!audioView->scannedFiles()) {
318 if(audioView->childCount() < 1) 316 if(audioView->childCount() < 1)
319 populateAudioView(); 317 populateAudioView();
@@ -348,5 +346,5 @@ void PlayListWidget::addAllMusicToList() {
348void PlayListWidget::addAllVideoToList() { 346void PlayListWidget::addAllVideoToList() {
349 347
350 if(!videoScan) { 348 if(!videoView->scannedFiles()) {
351 if(videoView->childCount() < 1) 349 if(videoView->childCount() < 1)
352 populateVideoView(); 350 populateVideoView();
@@ -639,5 +637,5 @@ void PlayListWidget::playSelected() {
639void PlayListWidget::scanForAudio() { 637void PlayListWidget::scanForAudio() {
640 audioView->scanFiles(); 638 audioView->scanFiles();
641 audioScan = true; 639 audioView->scannedFiles() = true;
642 populateAudioView(); 640 populateAudioView();
643} 641}
@@ -645,5 +643,5 @@ void PlayListWidget::scanForAudio() {
645void PlayListWidget::scanForVideo() { 643void PlayListWidget::scanForVideo() {
646 videoView->scanFiles(); 644 videoView->scanFiles();
647 videoScan = true; 645 videoView->scannedFiles() = true;
648 populateVideoView(); 646 populateVideoView();
649} 647}
@@ -653,5 +651,5 @@ void PlayListWidget::populateAudioView() {
653 StorageInfo storageInfo; 651 StorageInfo storageInfo;
654 // const QList<FileSystem> &fs = storageInfo.fileSystems(); 652 // const QList<FileSystem> &fs = storageInfo.fileSystems();
655 if(!audioScan) { 653 if(!audioView->scannedFiles()) {
656 scanForAudio(); 654 scanForAudio();
657 } 655 }
@@ -696,5 +694,5 @@ void PlayListWidget::populateVideoView() {
696 // const QList<FileSystem> &fs = storageInfo.fileSystems(); 694 // const QList<FileSystem> &fs = storageInfo.fileSystems();
697 695
698 if(!videoScan ) { 696 if(!videoView->scannedFiles()) {
699 scanForVideo(); 697 scanForVideo();
700 } 698 }
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h
index e81ef3c..58efd47 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.h
+++ b/noncore/multimedia/opieplayer2/playlistwidget.h
@@ -95,5 +95,5 @@ signals:
95private: 95private:
96 int defaultSkinIndex; 96 int defaultSkinIndex;
97 bool audioScan, videoScan, audioPopulated, videoPopulated; 97 bool audioPopulated, videoPopulated;
98 void readm3u(const QString &); 98 void readm3u(const QString &);
99 void readPls(const QString &); 99 void readPls(const QString &);