1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-24 01:39:42 +01:00

* Hooked up history-related signals to TomahawkWindow.

This commit is contained in:
Christian Muehlhaeuser 2012-05-19 06:13:13 +02:00
parent 285b254f76
commit ed4a631619
4 changed files with 26 additions and 0 deletions

View File

@ -372,6 +372,9 @@ TomahawkWindow::setupSignals()
connect( account->sipPlugin(), SIGNAL( addMenu( QMenu* ) ), this, SLOT( pluginMenuAdded( QMenu* ) ) );
connect( account->sipPlugin(), SIGNAL( removeMenu( QMenu* ) ), this, SLOT( pluginMenuRemoved( QMenu* ) ) );
}
connect( ViewManager::instance(), SIGNAL( historyBackAvailable( bool ) ), SLOT( onHistoryBackAvailable( bool ) ) );
connect( ViewManager::instance(), SIGNAL( historyForwardAvailable( bool ) ), SLOT( onHistoryForwardAvailable( bool ) ) );
}
@ -481,6 +484,20 @@ TomahawkWindow::keyPressEvent( QKeyEvent* e )
}
void
TomahawkWindow::onHistoryBackAvailable( bool avail )
{
m_backAction->setEnabled( avail );
}
void
TomahawkWindow::onHistoryForwardAvailable( bool avail )
{
m_forwardAction->setEnabled( avail );
}
void
TomahawkWindow::showSettingsDialog()
{

View File

@ -94,6 +94,9 @@ private slots:
void onAccountDisconnected();
void onAccountError();
void onHistoryBackAvailable( bool avail );
void onHistoryForwardAvailable( bool avail );
void onAudioEngineError( AudioEngine::AudioErrorCode error );
void onXSPFError( XSPFLoader::XSPFErrorCode error );

View File

@ -633,6 +633,9 @@ ViewManager::setPage( ViewPage* page, bool trackHistory )
m_pageHistory.insert( 0, page );
}
emit historyBackAvailable( m_pageHistory.count() > 1 );
emit historyForwardAvailable( false );
qDebug() << "View page shown:" << page->title();
emit viewPageActivated( page );

View File

@ -137,6 +137,9 @@ signals:
void hideQueueRequested();
void tomahawkLoaded();
void historyBackAvailable( bool avail );
void historyForwardAvailable( bool avail );
public slots:
Tomahawk::ViewPage* showSuperCollection();