mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
* Update control-states when queue changes.
This commit is contained in:
parent
0c7f330918
commit
4db3ea8d36
@ -832,6 +832,25 @@ AudioEngine::timerTriggered( qint64 time )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::setQueue( const playlistinterface_ptr& queue )
|
||||
{
|
||||
if ( m_queue )
|
||||
{
|
||||
disconnect( m_queue.data(), SIGNAL( previousTrackAvailable() ), this, SIGNAL( controlStateChanged() ) );
|
||||
disconnect( m_queue.data(), SIGNAL( nextTrackAvailable() ), this, SIGNAL( controlStateChanged() ) );
|
||||
}
|
||||
|
||||
m_queue = queue;
|
||||
|
||||
if ( m_queue )
|
||||
{
|
||||
connect( m_queue.data(), SIGNAL( previousTrackAvailable() ), SIGNAL( controlStateChanged() ) );
|
||||
connect( m_queue.data(), SIGNAL( nextTrackAvailable() ), SIGNAL( controlStateChanged() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioEngine::setPlaylist( Tomahawk::playlistinterface_ptr playlist )
|
||||
{
|
||||
@ -842,8 +861,8 @@ AudioEngine::setPlaylist( Tomahawk::playlistinterface_ptr playlist )
|
||||
{
|
||||
if ( m_playlist.data() )
|
||||
{
|
||||
disconnect( m_playlist.data(), SIGNAL( previousTrackAvailable( bool ) ) );
|
||||
disconnect( m_playlist.data(), SIGNAL( nextTrackAvailable( bool ) ) );
|
||||
disconnect( m_playlist.data(), SIGNAL( previousTrackAvailable() ) );
|
||||
disconnect( m_playlist.data(), SIGNAL( nextTrackAvailable() ) );
|
||||
}
|
||||
|
||||
m_playlist.data()->reset();
|
||||
|
@ -94,7 +94,7 @@ public slots:
|
||||
void playItem( const Tomahawk::artist_ptr& artist );
|
||||
void playItem( const Tomahawk::album_ptr& album );
|
||||
void setPlaylist( Tomahawk::playlistinterface_ptr playlist );
|
||||
void setQueue( Tomahawk::playlistinterface_ptr queue ) { m_queue = queue; }
|
||||
void setQueue( const Tomahawk::playlistinterface_ptr& queue );
|
||||
|
||||
void setStopAfterTrack( const Tomahawk::query_ptr& query );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user