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
@@ -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();