summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp18
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) :
connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
- if( !mediaPlayerState->isStreaming) { // this stops the slider from being moved, thus
- // does not stop stream when it reaches the end
- connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
- connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
- }
// Intialise state
setLength( mediaPlayerState->length() );
@@ -105,5 +100,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
setPaused( mediaPlayerState->paused() );
setPlaying( mediaPlayerState->playing() );
- if (mediaPlayerState->isStreaming) slider->hide();
}
@@ -144,4 +138,16 @@ void AudioWidget::setLength( long max ) {
void AudioWidget::setView( char view ) {
+ if (mediaPlayerState->isStreaming) {
+ if( !slider->isHidden()) slider->hide();
+ disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
+ disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
+ } else {
+// this stops the slider from being moved, thus
+ // does not stop stream when it reaches the end
+ if( slider->isHidden()) 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 );