-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 22 |
3 files changed, 0 insertions, 26 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 43040c2..586870c 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp | |||
@@ -66,9 +66,7 @@ void MediaPlayerState::readConfig( Config& cfg ) { | |||
66 | scaled = cfg.readBoolEntry( "Scaling" ); | 66 | scaled = cfg.readBoolEntry( "Scaling" ); |
67 | looping = cfg.readBoolEntry( "Looping" ); | 67 | looping = cfg.readBoolEntry( "Looping" ); |
68 | shuffled = cfg.readBoolEntry( "Shuffle" ); | 68 | shuffled = cfg.readBoolEntry( "Shuffle" ); |
69 | usePlaylist = cfg.readBoolEntry( "UsePlayList" ); | ||
70 | videoGamma = cfg.readNumEntry( "VideoGamma" ); | 69 | videoGamma = cfg.readNumEntry( "VideoGamma" ); |
71 | usePlaylist = TRUE; | ||
72 | playing = FALSE; | 70 | playing = FALSE; |
73 | streaming = FALSE; | 71 | streaming = FALSE; |
74 | paused = FALSE; | 72 | paused = FALSE; |
@@ -84,7 +82,6 @@ void MediaPlayerState::writeConfig( Config& cfg ) const { | |||
84 | cfg.writeEntry( "Scaling", scaled ); | 82 | cfg.writeEntry( "Scaling", scaled ); |
85 | cfg.writeEntry( "Looping", looping ); | 83 | cfg.writeEntry( "Looping", looping ); |
86 | cfg.writeEntry( "Shuffle", shuffled ); | 84 | cfg.writeEntry( "Shuffle", shuffled ); |
87 | cfg.writeEntry( "UsePlayList", usePlaylist ); | ||
88 | cfg.writeEntry( "VideoGamma", videoGamma ); | 85 | cfg.writeEntry( "VideoGamma", videoGamma ); |
89 | } | 86 | } |
90 | 87 | ||
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 7a80ad8..fc4e6cb 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h | |||
@@ -56,7 +56,6 @@ public: | |||
56 | bool isScaled() const { return scaled; } | 56 | bool isScaled() const { return scaled; } |
57 | bool isLooping() const { return looping; } | 57 | bool isLooping() const { return looping; } |
58 | bool isShuffled() const { return shuffled; } | 58 | bool isShuffled() const { return shuffled; } |
59 | bool isUsingPlaylist() const { return usePlaylist; } | ||
60 | bool isPaused() const { return paused; } | 59 | bool isPaused() const { return paused; } |
61 | bool isPlaying() const { return playing; } | 60 | bool isPlaying() const { return playing; } |
62 | bool isStopped() const { return stopped; } | 61 | bool isStopped() const { return stopped; } |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 5b277cc..f53def6 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -205,16 +205,12 @@ void PlayListWidget::writeDefaultPlaylist() { | |||
205 | 205 | ||
206 | void PlayListWidget::addToSelection( const DocLnk& lnk ) { | 206 | void PlayListWidget::addToSelection( const DocLnk& lnk ) { |
207 | d->setDocumentUsed = FALSE; | 207 | d->setDocumentUsed = FALSE; |
208 | if ( mediaPlayerState->isUsingPlaylist() ) { | ||
209 | if( QFileInfo( lnk.file() ).exists() || | 208 | if( QFileInfo( lnk.file() ).exists() || |
210 | lnk.file().left(4) == "http" ) { | 209 | lnk.file().left(4) == "http" ) { |
211 | d->selectedFiles->addToSelection( lnk ); | 210 | d->selectedFiles->addToSelection( lnk ); |
212 | } | 211 | } |
213 | // writeCurrentM3u(); | 212 | // writeCurrentM3u(); |
214 | } | 213 | } |
215 | else | ||
216 | mediaPlayerState->setPlaying( TRUE ); | ||
217 | } | ||
218 | 214 | ||
219 | 215 | ||
220 | void PlayListWidget::clearList() { | 216 | void PlayListWidget::clearList() { |
@@ -422,16 +418,11 @@ void PlayListWidget::useSelectedDocument() { | |||
422 | const DocLnk *PlayListWidget::current() const { // this is fugly | 418 | const DocLnk *PlayListWidget::current() const { // this is fugly |
423 | assert( currentTab() == CurrentPlayList ); | 419 | assert( currentTab() == CurrentPlayList ); |
424 | 420 | ||
425 | // qDebug("playlist"); | ||
426 | if ( mediaPlayerState->isUsingPlaylist() ) | ||
427 | return d->selectedFiles->current(); | 421 | return d->selectedFiles->current(); |
428 | |||
429 | assert( false ); | ||
430 | } | 422 | } |
431 | 423 | ||
432 | 424 | ||
433 | bool PlayListWidget::prev() { | 425 | bool PlayListWidget::prev() { |
434 | if ( mediaPlayerState->isUsingPlaylist() ) { | ||
435 | if ( mediaPlayerState->isShuffled() ) { | 426 | if ( mediaPlayerState->isShuffled() ) { |
436 | const DocLnk *cur = current(); | 427 | const DocLnk *cur = current(); |
437 | int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0)); | 428 | int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0)); |
@@ -454,15 +445,11 @@ bool PlayListWidget::prev() { | |||
454 | } | 445 | } |
455 | return TRUE; | 446 | return TRUE; |
456 | } | 447 | } |
457 | } else { | ||
458 | return mediaPlayerState->isLooping(); | ||
459 | } | ||
460 | } | 448 | } |
461 | 449 | ||
462 | 450 | ||
463 | bool PlayListWidget::next() { | 451 | bool PlayListWidget::next() { |
464 | //qDebug("<<<<<<<<<<<<next()"); | 452 | //qDebug("<<<<<<<<<<<<next()"); |
465 | if ( mediaPlayerState->isUsingPlaylist() ) { | ||
466 | if ( mediaPlayerState->isShuffled() ) { | 453 | if ( mediaPlayerState->isShuffled() ) { |
467 | return prev(); | 454 | return prev(); |
468 | } else { | 455 | } else { |
@@ -475,25 +462,16 @@ bool PlayListWidget::next() { | |||
475 | } | 462 | } |
476 | return TRUE; | 463 | return TRUE; |
477 | } | 464 | } |
478 | } else { | ||
479 | return mediaPlayerState->isLooping(); | ||
480 | } | ||
481 | } | 465 | } |
482 | 466 | ||
483 | 467 | ||
484 | bool PlayListWidget::first() { | 468 | bool PlayListWidget::first() { |
485 | if ( mediaPlayerState->isUsingPlaylist() ) | ||
486 | return d->selectedFiles->first(); | 469 | return d->selectedFiles->first(); |
487 | else | ||
488 | return mediaPlayerState->isLooping(); | ||
489 | } | 470 | } |
490 | 471 | ||
491 | 472 | ||
492 | bool PlayListWidget::last() { | 473 | bool PlayListWidget::last() { |
493 | if ( mediaPlayerState->isUsingPlaylist() ) | ||
494 | return d->selectedFiles->last(); | 474 | return d->selectedFiles->last(); |
495 | else | ||
496 | return mediaPlayerState->isLooping(); | ||
497 | } | 475 | } |
498 | 476 | ||
499 | 477 | ||