mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 16:44:05 +02:00
Keep the dynamic playlist description up to date when it is changed
This commit is contained in:
@@ -345,6 +345,8 @@ DynamicWidget::controlsChanged()
|
|||||||
return;
|
return;
|
||||||
m_playlist->createNewRevision();
|
m_playlist->createNewRevision();
|
||||||
m_seqRevLaunched++;
|
m_seqRevLaunched++;
|
||||||
|
|
||||||
|
emit descriptionChanged( m_playlist->generator()->sentenceSummary() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -356,6 +358,8 @@ DynamicWidget::controlChanged( const Tomahawk::dyncontrol_ptr& control )
|
|||||||
m_seqRevLaunched++;
|
m_seqRevLaunched++;
|
||||||
|
|
||||||
showPreview();
|
showPreview();
|
||||||
|
|
||||||
|
emit descriptionChanged( m_playlist->generator()->sentenceSummary() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -94,6 +94,9 @@ public slots:
|
|||||||
void playlistChanged( PlaylistInterface* );
|
void playlistChanged( PlaylistInterface* );
|
||||||
void tracksAdded();
|
void tracksAdded();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void descriptionChanged( const QString& caption );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void generate( int = -1 );
|
void generate( int = -1 );
|
||||||
void tracksGenerated( const QList< Tomahawk::query_ptr>& queries );
|
void tracksGenerated( const QList< Tomahawk::query_ptr>& queries );
|
||||||
|
@@ -553,6 +553,13 @@ PlaylistManager::setPage( ViewPage* page, bool trackHistory )
|
|||||||
if ( !AudioEngine::instance()->isPlaying() )
|
if ( !AudioEngine::instance()->isPlaying() )
|
||||||
AudioEngine::instance()->setPlaylist( currentPlaylistInterface() );
|
AudioEngine::instance()->setPlaylist( currentPlaylistInterface() );
|
||||||
|
|
||||||
|
// UGH!
|
||||||
|
if( QObject* obj = dynamic_cast< QObject* >( currentPage() ) ) {
|
||||||
|
// qDebug() << SIGNAL( descriptionChanged( QString ) ) << QMetaObject::normalizedSignature( SIGNAL( descriptionChanged( QString ) ) ) << obj->metaObject()->indexOfSignal( QMetaObject::normalizedSignature( SIGNAL( descriptionChanged( QString ) ) ) );
|
||||||
|
// if( obj->metaObject()->indexOfSignal( QMetaObject::normalizedSignature( SIGNAL( descriptionChanged( QString ) ) ) ) > -1 ) // if the signal exists (just to hide the qobject runtime warning...)
|
||||||
|
connect( obj, SIGNAL( descriptionChanged( QString ) ), m_infobar, SLOT( setDescription( QString ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
m_stack->setCurrentWidget( page->widget() );
|
m_stack->setCurrentWidget( page->widget() );
|
||||||
updateView();
|
updateView();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user