Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidgetgui.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index 23b7a70..5fc0c39 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | |||
@@ -200,29 +200,7 @@ void PlayListWidgetGui::setActiveWindow() { | |||
200 | // When we get raised we need to ensure that it switches views | 200 | // When we get raised we need to ensure that it switches views |
201 | MediaPlayerState::DisplayType origDisplayType = mediaPlayerState.displayType(); | 201 | MediaPlayerState::DisplayType origDisplayType = mediaPlayerState.displayType(); |
202 | mediaPlayerState.setDisplayType( MediaPlayerState::MediaSelection ); // invalidate | 202 | mediaPlayerState.setDisplayType( MediaPlayerState::MediaSelection ); // invalidate |
203 | mediaPlayerState.setDisplayType( origDisplayType ); // now switch back | 203 | mediaPlayerState.setDisplayType( origDisplayType ); // now switch back |
204 | } | 204 | } |
205 | 205 | ||
206 | PlayButton::PlayButton( MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name, | ||
207 | const QString &icon, QObject *handler, const QString &slot, bool t ) | ||
208 | : ToolButton( parent, name, icon, handler, slot, t ), mediaPlayerState( _mediaPlayerState ), | ||
209 | m_lastEnableStatus( true ) | ||
210 | { | ||
211 | connect( &mediaPlayerState, SIGNAL( initialized() ), | ||
212 | this, SLOT( checkInitializationStatus() ) ); | ||
213 | } | ||
214 | |||
215 | void PlayButton::setEnabled( bool enable ) | ||
216 | { | ||
217 | m_lastEnableStatus = enable; | ||
218 | |||
219 | enable &= mediaPlayerState.isInitialized(); | ||
220 | |||
221 | ToolButton::setEnabled( enable ); | ||
222 | } | ||
223 | |||
224 | void PlayButton::checkInitializationStatus() | ||
225 | { | ||
226 | setEnabled( m_lastEnableStatus ); | ||
227 | } | ||
228 | 206 | ||