-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 | |||
@@ -94,9 +94,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
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() ); |
@@ -105,5 +100,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
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 | } |
@@ -144,4 +138,16 @@ void AudioWidget::setLength( long max ) { | |||
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 ); |