summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayer.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 8d8e4e5..a3238f0 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -31,7 +31,9 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name )
31 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 31 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
32 32
33 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); 33 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) );
34
34 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); 35 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) );
36
35 connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); 37 connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
36 connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); 38 connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
37 39
@@ -50,15 +52,14 @@ MediaPlayer::~MediaPlayer() {
50} 52}
51 53
52void MediaPlayer::pauseCheck( bool b ) { 54void MediaPlayer::pauseCheck( bool b ) {
53 // Only pause if playing 55 if ( b && !mediaPlayerState->playing() ) {
54 if ( b && !mediaPlayerState->playing() ) { 56 mediaPlayerState->setPaused( FALSE );
55 mediaPlayerState->setPaused( FALSE ); 57 }
56 }
57} 58}
58 59
59void MediaPlayer::play() { 60void MediaPlayer::play() {
60 mediaPlayerState->setPlaying( FALSE ); 61 mediaPlayerState->setPlaying( FALSE );
61 mediaPlayerState->setPlaying( TRUE ); 62 mediaPlayerState->setPlaying( TRUE );
62} 63}
63 64
64void MediaPlayer::setPlaying( bool play ) { 65void MediaPlayer::setPlaying( bool play ) {
@@ -67,10 +68,10 @@ void MediaPlayer::setPlaying( bool play ) {
67 return; 68 return;
68 } 69 }
69 70
70 if ( mediaPlayerState->paused() ) { 71 if ( mediaPlayerState->paused() ) {
71 mediaPlayerState->setPaused( FALSE ); 72 mediaPlayerState->setPaused( FALSE );
72 return; 73 return;
73 } 74 }
74 75
75 const DocLnk *playListCurrent = playList->current(); 76 const DocLnk *playListCurrent = playList->current();
76 if ( playListCurrent != NULL ) { 77 if ( playListCurrent != NULL ) {