author | simon <simon> | 2002-12-02 17:27:32 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 17:27:32 (UTC) |
commit | 2f2f6cfbc31e0144060588b26814301ce99ebd39 (patch) (side-by-side diff) | |
tree | 9ca13234ce515afc57b2a11b5b4f9c2144a6b038 /noncore/multimedia | |
parent | 28f9d0587b2ee6a6a9467f658567a45ab7e95b94 (diff) | |
download | opie-2f2f6cfbc31e0144060588b26814301ce99ebd39.zip opie-2f2f6cfbc31e0144060588b26814301ce99ebd39.tar.gz opie-2f2f6cfbc31e0144060588b26814301ce99ebd39.tar.bz2 |
- as MediaPlayerState::isUsingPlaylist() always returns true we can remove
it and simplify some code in the playlistwidget due to that
-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 @@ -68,5 +68,3 @@ void MediaPlayerState::readConfig( Config& cfg ) { shuffled = cfg.readBoolEntry( "Shuffle" ); - usePlaylist = cfg.readBoolEntry( "UsePlayList" ); videoGamma = cfg.readNumEntry( "VideoGamma" ); - usePlaylist = TRUE; playing = FALSE; @@ -86,3 +84,2 @@ void MediaPlayerState::writeConfig( Config& cfg ) const { cfg.writeEntry( "Shuffle", shuffled ); - cfg.writeEntry( "UsePlayList", usePlaylist ); cfg.writeEntry( "VideoGamma", videoGamma ); 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 @@ -58,3 +58,2 @@ public: bool isShuffled() const { return shuffled; } - bool isUsingPlaylist() const { return usePlaylist; } bool isPaused() const { return paused; } 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 @@ -207,3 +207,2 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) { d->setDocumentUsed = FALSE; - if ( mediaPlayerState->isUsingPlaylist() ) { if( QFileInfo( lnk.file() ).exists() || @@ -214,5 +213,2 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) { } - else - mediaPlayerState->setPlaying( TRUE ); -} @@ -424,7 +420,3 @@ const DocLnk *PlayListWidget::current() const { // this is fugly -// qDebug("playlist"); - if ( mediaPlayerState->isUsingPlaylist() ) return d->selectedFiles->current(); - - assert( false ); } @@ -433,3 +425,2 @@ const DocLnk *PlayListWidget::current() const { // this is fugly bool PlayListWidget::prev() { - if ( mediaPlayerState->isUsingPlaylist() ) { if ( mediaPlayerState->isShuffled() ) { @@ -456,5 +447,2 @@ bool PlayListWidget::prev() { } - } else { - return mediaPlayerState->isLooping(); - } } @@ -464,3 +452,2 @@ bool PlayListWidget::next() { //qDebug("<<<<<<<<<<<<next()"); - if ( mediaPlayerState->isUsingPlaylist() ) { if ( mediaPlayerState->isShuffled() ) { @@ -477,5 +464,2 @@ bool PlayListWidget::next() { } - } else { - return mediaPlayerState->isLooping(); - } } @@ -484,6 +468,3 @@ bool PlayListWidget::next() { bool PlayListWidget::first() { - if ( mediaPlayerState->isUsingPlaylist() ) return d->selectedFiles->first(); - else - return mediaPlayerState->isLooping(); } @@ -492,6 +473,3 @@ bool PlayListWidget::first() { bool PlayListWidget::last() { - if ( mediaPlayerState->isUsingPlaylist() ) return d->selectedFiles->last(); - else - return mediaPlayerState->isLooping(); } |