summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-11-14 02:56:04 (UTC)
committer llornkcor <llornkcor>2002-11-14 02:56:04 (UTC)
commit4a60497bd689bd01ca301378f382bff6863b592e (patch) (side-by-side diff)
tree3b9926eb8f6f89b204eaca2a443b6bb9b5e9f883
parent3bfb64a41ca7948b593982fc1c266d5ec829b9ab (diff)
downloadopie-4a60497bd689bd01ca301378f382bff6863b592e.zip
opie-4a60497bd689bd01ca301378f382bff6863b592e.tar.gz
opie-4a60497bd689bd01ca301378f382bff6863b592e.tar.bz2
no longer scans and populates audio_video lists everytime tab is changed. rescan from File menu does it except for the first tab change
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
@@ -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 &);