-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index b9561d5..e2e3603 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp | |||
@@ -92,20 +92,14 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
92 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); | 92 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); |
93 | connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); | 93 | connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); |
94 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 94 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
95 | 95 | ||
96 | if( !mediaPlayerState->isStreaming) { // this stops the slider from being moved, thus | ||
97 | // does not stop stream when it reaches the end | ||
98 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | ||
99 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | ||
100 | } | ||
101 | // Intialise state | 96 | // Intialise state |
102 | setLength( mediaPlayerState->length() ); | 97 | setLength( mediaPlayerState->length() ); |
103 | setPosition( mediaPlayerState->position() ); | 98 | setPosition( mediaPlayerState->position() ); |
104 | setLooping( mediaPlayerState->fullscreen() ); | 99 | setLooping( mediaPlayerState->fullscreen() ); |
105 | setPaused( mediaPlayerState->paused() ); | 100 | setPaused( mediaPlayerState->paused() ); |
106 | setPlaying( mediaPlayerState->playing() ); | 101 | setPlaying( mediaPlayerState->playing() ); |
107 | if (mediaPlayerState->isStreaming) slider->hide(); | ||
108 | 102 | ||
109 | } | 103 | } |
110 | 104 | ||
111 | 105 | ||
@@ -142,8 +136,20 @@ void AudioWidget::setLength( long max ) { | |||
142 | } | 136 | } |
143 | 137 | ||
144 | 138 | ||
145 | void AudioWidget::setView( char view ) { | 139 | void AudioWidget::setView( char view ) { |
140 | if (mediaPlayerState->isStreaming) { | ||
141 | if( !slider->isHidden()) slider->hide(); | ||
142 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | ||
143 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | ||
144 | } else { | ||
145 | // this stops the slider from being moved, thus | ||
146 | // does not stop stream when it reaches the end | ||
147 | if( slider->isHidden()) slider->show(); | ||
148 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | ||
149 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | ||
150 | } | ||
151 | |||
146 | if ( view == 'a' ) { | 152 | if ( view == 'a' ) { |
147 | startTimer( 150 ); | 153 | startTimer( 150 ); |
148 | showMaximized(); | 154 | showMaximized(); |
149 | } else { | 155 | } else { |