From 6baf582094b418ec1defa2415210a7d7583628ff Mon Sep 17 00:00:00 2001 From: llornkcor Date: Tue, 13 Aug 2002 23:42:50 +0000 Subject: fix video button actions.. still needs work --- (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') 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 ) connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); + connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); + connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); @@ -50,15 +52,14 @@ MediaPlayer::~MediaPlayer() { } void MediaPlayer::pauseCheck( bool b ) { - // Only pause if playing - if ( b && !mediaPlayerState->playing() ) { - mediaPlayerState->setPaused( FALSE ); - } + if ( b && !mediaPlayerState->playing() ) { + mediaPlayerState->setPaused( FALSE ); + } } void MediaPlayer::play() { - mediaPlayerState->setPlaying( FALSE ); - mediaPlayerState->setPlaying( TRUE ); + mediaPlayerState->setPlaying( FALSE ); + mediaPlayerState->setPlaying( TRUE ); } void MediaPlayer::setPlaying( bool play ) { @@ -67,10 +68,10 @@ void MediaPlayer::setPlaying( bool play ) { return; } - if ( mediaPlayerState->paused() ) { - mediaPlayerState->setPaused( FALSE ); - return; - } + if ( mediaPlayerState->paused() ) { + mediaPlayerState->setPaused( FALSE ); + return; + } const DocLnk *playListCurrent = playList->current(); if ( playListCurrent != NULL ) { -- cgit v0.9.0.2