summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore 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
@@ -3,9 +3,9 @@
#include <qpe/global.h>
PlayListFileView::PlayListFileView( const QString &mimeTypePattern, QWidget *parent, const char *name )
- : PlayListView( parent, name ), m_mimeTypePattern( mimeTypePattern )
+ : PlayListView( parent, name ), m_mimeTypePattern( mimeTypePattern ), m_scannedFiles( false )
{
addColumn( tr( "Title" ), 140);
addColumn( tr( "Size" ), -1 );
addColumn(tr( "Media" ), 0 );
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
@@ -11,16 +11,20 @@ class PlayListFileView : public PlayListView
public:
PlayListFileView( const QString &mimeTypePattern, QWidget *parent, const char *name = 0 );
virtual ~PlayListFileView();
+ // both temporarily accessible that way until the caller code has
+ // been migrated into this class
DocLnkSet &files() { return m_files; }
+ bool &scannedFiles() { return m_scannedFiles; }
public slots:
void scanFiles();
private:
QString m_mimeTypePattern;
DocLnkSet m_files;
+ bool m_scannedFiles;
};
#endif // PLAYLISTFILEVIEW_H
/* vim: et sw=4 ts=4
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
@@ -150,10 +150,8 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par
connect ( gammaSlider, SIGNAL( valueChanged( int ) ),
&mediaPlayerState, SLOT( setVideoGamma( int ) ) );
// see which skins are installed
- videoScan=false;
- audioScan=false;
audioPopulated=false;
videoPopulated=false;
populateSkinsMenu();
initializeStates();
@@ -253,9 +251,9 @@ void PlayListWidget::addAllToList() {
// QTime t;
// t.start();
- if(!audioScan) {
+ if(!audioView->scannedFiles()) {
if(audioView->childCount() < 1)
populateAudioView();
}
@@ -269,9 +267,9 @@ void PlayListWidget::addAllToList() {
lnk.setFile( filename ); //sets file name
d->selectedFiles->addToSelection( lnk);
}
- if(!videoScan) {
+ if(!videoView->scannedFiles()) {
if(videoView->childCount() < 1)
populateVideoView();
}
@@ -313,9 +311,9 @@ void PlayListWidget::addAllToList() {
void PlayListWidget::addAllMusicToList() {
- if(!audioScan) {
+ if(!audioView->scannedFiles()) {
if(audioView->childCount() < 1)
populateAudioView();
}
@@ -346,9 +344,9 @@ void PlayListWidget::addAllMusicToList() {
void PlayListWidget::addAllVideoToList() {
- if(!videoScan) {
+ if(!videoView->scannedFiles()) {
if(videoView->childCount() < 1)
populateVideoView();
}
@@ -637,23 +635,23 @@ void PlayListWidget::playSelected() {
void PlayListWidget::scanForAudio() {
audioView->scanFiles();
- audioScan = true;
+ audioView->scannedFiles() = true;
populateAudioView();
}
void PlayListWidget::scanForVideo() {
videoView->scanFiles();
- videoScan = true;
+ videoView->scannedFiles() = true;
populateVideoView();
}
void PlayListWidget::populateAudioView() {
audioView->clear();
StorageInfo storageInfo;
// const QList<FileSystem> &fs = storageInfo.fileSystems();
- if(!audioScan) {
+ if(!audioView->scannedFiles()) {
scanForAudio();
}
QListIterator<DocLnk> dit( audioView->files().children() );
@@ -694,9 +692,9 @@ void PlayListWidget::populateVideoView() {
videoView->clear();
StorageInfo storageInfo;
// const QList<FileSystem> &fs = storageInfo.fileSystems();
- if(!videoScan ) {
+ if(!videoView->scannedFiles()) {
scanForVideo();
}
QListIterator<DocLnk> Vdit( videoView->files().children() );
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
@@ -93,9 +93,9 @@ signals:
void skinSelected();
private:
int defaultSkinIndex;
- bool audioScan, videoScan, audioPopulated, videoPopulated;
+ bool audioPopulated, videoPopulated;
void readm3u(const QString &);
void readPls(const QString &);
void initializeStates();
void populateAudioView();