author | llornkcor <llornkcor> | 2002-08-13 23:42:50 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-08-13 23:42:50 (UTC) |
commit | 6baf582094b418ec1defa2415210a7d7583628ff (patch) (unidiff) | |
tree | e7ee4a196eeb23a1b9276ab09f01aaf39ced83e3 /noncore/multimedia/opieplayer2/mediaplayer.cpp | |
parent | 8abcf5a17d4ec31ad01557b69b8b0e7d97dc0c8f (diff) | |
download | opie-6baf582094b418ec1defa2415210a7d7583628ff.zip opie-6baf582094b418ec1defa2415210a7d7583628ff.tar.gz opie-6baf582094b418ec1defa2415210a7d7583628ff.tar.bz2 |
fix video button actions.. still needs work
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 21 |
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 | ||
52 | void MediaPlayer::pauseCheck( bool b ) { | 54 | void 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 | ||
59 | void MediaPlayer::play() { | 60 | void MediaPlayer::play() { |
60 | mediaPlayerState->setPlaying( FALSE ); | 61 | mediaPlayerState->setPlaying( FALSE ); |
61 | mediaPlayerState->setPlaying( TRUE ); | 62 | mediaPlayerState->setPlaying( TRUE ); |
62 | } | 63 | } |
63 | 64 | ||
64 | void MediaPlayer::setPlaying( bool play ) { | 65 | void 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 ) { |