-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 | |||
@@ -93,18 +93,12 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
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 | ||
@@ -143,6 +137,18 @@ void AudioWidget::setLength( long max ) { | |||
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(); |