-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 13 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 9 |
2 files changed, 21 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 132a911..442864f 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -316,24 +316,25 @@ void AudioWidget::setView( char view ) { slider.show(); connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); } if ( view == 'a' ) { // startTimer( 150 ); showMaximized(); } else { killTimers(); hide(); } + qApp->processEvents(); } static QString timeAsString( long length ) { int minutes = length / 60; int seconds = length % 60; return QString("%1:%2%3").arg( minutes ).arg( seconds / 10 ).arg( seconds % 10 ); } void AudioWidget::updateSlider( long i, long max ) { time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); @@ -561,17 +562,27 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) // toggleButton(5); break; case Key_Right: // toggleButton(3); mediaPlayerState->setNext(); // toggleButton(3); break; case Key_Left: // toggleButton(4); mediaPlayerState->setPrev(); // toggleButton(4); break; - case Key_Escape: + case Key_Escape: { +#if defined(QT_QWS_IPAQ) + if( mediaPlayerState->isPaused ) { + setToggleButton( i, FALSE ); + mediaPlayerState->setPaused( FALSE ); + } else if( !mediaPlayerState->isPaused ) { + setToggleButton( i, TRUE ); + mediaPlayerState->setPaused( TRUE ); + } +#endif + } break; }; } diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 0521419..5a69bf5 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -469,24 +469,33 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) { // toggleButton(5); emit moreClicked(); emit moreReleased(); // toggleButton(5); break; case Key_Right: mediaPlayerState->setNext(); break; case Key_Left: mediaPlayerState->setPrev(); break; case Key_Escape: +#if defined(QT_QWS_IPAQ) + if( mediaPlayerState->isPaused ) { + setToggleButton( i, FALSE ); + mediaPlayerState->setPaused( FALSE ); + } else if( !mediaPlayerState->isPaused ) { + setToggleButton( i, TRUE ); + mediaPlayerState->setPaused( TRUE ); + } +#endif break; }; } XineVideoWidget* VideoWidget::vidWidget() { return videoFrame; } void VideoWidget::setFullscreen ( bool b ) { setToggleButton( VideoFullscreen, b ); |