summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/xinecontrol.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 8b9413f..84ef3f3 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -34,4 +34,6 @@
34 34
35#include <qtimer.h> 35#include <qtimer.h>
36#include <qpe/qcopenvelope_qws.h>
37#include <qpe/qpeapplication.h>
36#include "xinecontrol.h" 38#include "xinecontrol.h"
37#include "mediaplayerstate.h" 39#include "mediaplayerstate.h"
@@ -51,7 +53,16 @@ XineControl::XineControl( QObject *parent, const char *name )
51 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); 53 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );
52 connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); 54 connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) );
55
56 disabledSuspendScreenSaver = FALSE;
53} 57}
54 58
55XineControl::~XineControl() { 59XineControl::~XineControl() {
60#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
61 if ( disabledSuspendScreenSaver ) {
62 disabledSuspendScreenSaver = FALSE;
63 // Re-enable the suspend mode
64 QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
65 }
66#endif
56 delete libXine; 67 delete libXine;
57} 68}
@@ -80,4 +91,14 @@ void XineControl::play( const QString& fileName ) {
80 // which gui (video / audio) 91 // which gui (video / audio)
81 mediaPlayerState->setView( whichGui ); 92 mediaPlayerState->setView( whichGui );
93
94#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
95 if ( !disabledSuspendScreenSaver ) {
96 disabledSuspendScreenSaver = TRUE;
97 // Stop the screen from blanking and power saving state
98 QCopEnvelope("QPE/System", "setScreenSaverMode(int)" )
99 << ( whichGui == 'v' ? QPEApplication::Disable : QPEApplication::DisableSuspend );
100 }
101#endif
102
82 length(); 103 length();
83 position(); 104 position();
@@ -93,4 +114,13 @@ void XineControl::stop( bool isSet ) {
93 mediaPlayerState->setList(); 114 mediaPlayerState->setList();
94 //mediaPlayerState->setPlaying( false ); 115 //mediaPlayerState->setPlaying( false );
116
117#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
118 if ( disabledSuspendScreenSaver ) {
119 disabledSuspendScreenSaver = FALSE;
120 // Re-enable the suspend mode
121 QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
122 }
123#endif
124
95 } else { 125 } else {
96 // play again 126 // play again