-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 8acc488..06b1a04 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -39,48 +39,50 @@ MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPla | |||
39 | fd=-1;fl=-1; | 39 | fd=-1;fl=-1; |
40 | playList.setCaption( tr( "OpiePlayer: Initializating" ) ); | 40 | playList.setCaption( tr( "OpiePlayer: Initializating" ) ); |
41 | 41 | ||
42 | qApp->processEvents(); | 42 | qApp->processEvents(); |
43 | // QPEApplication::grabKeyboard(); // EVIL | 43 | // QPEApplication::grabKeyboard(); // EVIL |
44 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 44 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
45 | 45 | ||
46 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); | 46 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); |
47 | 47 | ||
48 | connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); | 48 | connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); |
49 | 49 | ||
50 | connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); | 50 | connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); |
51 | connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); | 51 | connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); |
52 | connect( &mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); | 52 | connect( &mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); |
53 | 53 | ||
54 | volControl = new VolumeControl; | 54 | volControl = new VolumeControl; |
55 | Config cfg( "OpiePlayer" ); | 55 | Config cfg( "OpiePlayer" ); |
56 | cfg.setGroup("PlayList"); | 56 | cfg.setGroup("PlayList"); |
57 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); | 57 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); |
58 | playList.setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() ); | 58 | playList.setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() ); |
59 | } | 59 | } |
60 | 60 | ||
61 | MediaPlayer::~MediaPlayer() { | 61 | MediaPlayer::~MediaPlayer() { |
62 | delete xineControl; | 62 | delete xineControl; |
63 | delete audioUI; | ||
64 | delete videoUI; | ||
63 | delete volControl; | 65 | delete volControl; |
64 | } | 66 | } |
65 | 67 | ||
66 | void MediaPlayer::pauseCheck( bool b ) { | 68 | void MediaPlayer::pauseCheck( bool b ) { |
67 | if ( b && !mediaPlayerState.isPlaying() ) { | 69 | if ( b && !mediaPlayerState.isPlaying() ) { |
68 | mediaPlayerState.setPaused( FALSE ); | 70 | mediaPlayerState.setPaused( FALSE ); |
69 | } | 71 | } |
70 | } | 72 | } |
71 | 73 | ||
72 | void MediaPlayer::play() { | 74 | void MediaPlayer::play() { |
73 | mediaPlayerState.setPlaying( FALSE ); | 75 | mediaPlayerState.setPlaying( FALSE ); |
74 | mediaPlayerState.setPlaying( TRUE ); | 76 | mediaPlayerState.setPlaying( TRUE ); |
75 | } | 77 | } |
76 | 78 | ||
77 | void MediaPlayer::setPlaying( bool play ) { | 79 | void MediaPlayer::setPlaying( bool play ) { |
78 | if ( !play ) { | 80 | if ( !play ) { |
79 | return; | 81 | return; |
80 | } | 82 | } |
81 | 83 | ||
82 | if ( mediaPlayerState.isPaused() ) { | 84 | if ( mediaPlayerState.isPaused() ) { |
83 | mediaPlayerState.setPaused( FALSE ); | 85 | mediaPlayerState.setPaused( FALSE ); |
84 | return; | 86 | return; |
85 | } | 87 | } |
86 | 88 | ||