mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-14 13:01:53 +02:00
* Disable previous and next buttons when those functions are not available to AudioEngine.
This commit is contained in:
parent
2988508b58
commit
dfe97582fc
@ -264,6 +264,9 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
||||
ui->loveButton->setToolTip( tr( "Love" ) );
|
||||
ui->ownerButton->setToolTip( QString( tr( "Playing from %1" ) ).arg( result->friendlySource() ) );
|
||||
|
||||
ui->prevButton->setEnabled( AudioEngine::instance()->canGoPrevious() );
|
||||
ui->nextButton->setEnabled( AudioEngine::instance()->canGoNext() );
|
||||
|
||||
QPixmap sourceIcon = result->sourceIcon( Result::Plain, ui->ownerButton->size() );
|
||||
if ( !sourceIcon.isNull() )
|
||||
ui->ownerButton->setPixmap( sourceIcon );
|
||||
@ -393,6 +396,9 @@ AudioControls::onPlaybackStopped()
|
||||
ui->socialButton->setToolTip( "" );
|
||||
ui->loveButton->setToolTip( "" );
|
||||
ui->ownerButton->setToolTip( "" );
|
||||
|
||||
ui->prevButton->setEnabled( AudioEngine::instance()->canGoPrevious() );
|
||||
ui->nextButton->setEnabled( AudioEngine::instance()->canGoNext() );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user