mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
* Split audioStopped / audioPaused into separate slots.
This commit is contained in:
@@ -120,6 +120,8 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
|||||||
|
|
||||||
// set initial state
|
// set initial state
|
||||||
onAccountDisconnected();
|
onAccountDisconnected();
|
||||||
|
audioStopped();
|
||||||
|
|
||||||
vm->setQueue( m_queueView );
|
vm->setQueue( m_queueView );
|
||||||
vm->showWelcomePage();
|
vm->showWelcomePage();
|
||||||
}
|
}
|
||||||
@@ -335,7 +337,7 @@ TomahawkWindow::setupSignals()
|
|||||||
connect( AudioEngine::instance(), SIGNAL( loading( const Tomahawk::result_ptr& ) ), SLOT( onPlaybackLoading( const Tomahawk::result_ptr& ) ) );
|
connect( AudioEngine::instance(), SIGNAL( loading( const Tomahawk::result_ptr& ) ), SLOT( onPlaybackLoading( const Tomahawk::result_ptr& ) ) );
|
||||||
connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( audioStarted() ) );
|
connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( audioStarted() ) );
|
||||||
connect( AudioEngine::instance(), SIGNAL( resumed()), SLOT( audioStarted() ) );
|
connect( AudioEngine::instance(), SIGNAL( resumed()), SLOT( audioStarted() ) );
|
||||||
connect( AudioEngine::instance(), SIGNAL( paused() ), SLOT( audioStopped() ) );
|
connect( AudioEngine::instance(), SIGNAL( paused() ), SLOT( audioPaused() ) );
|
||||||
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( audioStopped() ) );
|
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( audioStopped() ) );
|
||||||
|
|
||||||
// <Menu Items>
|
// <Menu Items>
|
||||||
@@ -778,21 +780,27 @@ void
|
|||||||
TomahawkWindow::audioStarted()
|
TomahawkWindow::audioStarted()
|
||||||
{
|
{
|
||||||
m_audioRetryCounter = 0;
|
m_audioRetryCounter = 0;
|
||||||
|
|
||||||
ui->actionPlay->setText( tr( "Pause" ) );
|
ui->actionPlay->setText( tr( "Pause" ) );
|
||||||
|
ActionCollection::instance()->getAction( "stop" )->setEnabled( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TomahawkWindow::audioPaused()
|
||||||
|
{
|
||||||
|
ui->actionPlay->setText( tr( "Play" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TomahawkWindow::audioStopped()
|
TomahawkWindow::audioStopped()
|
||||||
{
|
{
|
||||||
ui->actionPlay->setText( tr( "Play" ) );
|
audioPaused();
|
||||||
|
ActionCollection::instance()->getAction( "stop" )->setEnabled( false );
|
||||||
|
|
||||||
tDebug() << Q_FUNC_INFO << AudioEngine::instance()->isStopped();
|
|
||||||
if ( AudioEngine::instance()->isStopped() )
|
|
||||||
{
|
|
||||||
m_currentTrack = result_ptr();
|
m_currentTrack = result_ptr();
|
||||||
setWindowTitle( m_windowTitle );
|
setWindowTitle( m_windowTitle );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -110,6 +110,7 @@ private slots:
|
|||||||
void onPlaybackLoading( const Tomahawk::result_ptr& result );
|
void onPlaybackLoading( const Tomahawk::result_ptr& result );
|
||||||
|
|
||||||
void audioStarted();
|
void audioStarted();
|
||||||
|
void audioPaused();
|
||||||
void audioStopped();
|
void audioStopped();
|
||||||
|
|
||||||
void showAboutTomahawk();
|
void showAboutTomahawk();
|
||||||
|
Reference in New Issue
Block a user