1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-08 23:26:40 +02:00

* Use new ViewPage API in ViewManager.

This commit is contained in:
Christian Muehlhaeuser
2012-07-03 02:50:08 +02:00
parent b8cc0ddbcd
commit c32800c119

View File

@@ -566,8 +566,8 @@ ViewManager::setFilter( const QString& filter )
void void
ViewManager::applyFilter() ViewManager::applyFilter()
{ {
if ( currentPlaylistInterface() && currentPlaylistInterface()->filter() != m_filter ) if ( m_currentPage )
currentPlaylistInterface()->setFilter( m_filter ); m_currentPage->setFilter( m_filter );
} }
@@ -778,14 +778,14 @@ ViewManager::updateView()
connect( currentPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), connect( currentPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ),
SIGNAL( shuffleModeChanged( bool ) ) ); SIGNAL( shuffleModeChanged( bool ) ) );
m_infobar->setFilter( currentPlaylistInterface()->filter() ); m_infobar->setFilter( currentPage()->filter() );
} }
if ( currentPage()->showStatsBar() && currentPlaylistInterface() ) if ( currentPage()->showStatsBar() && currentPlaylistInterface() )
{ {
emit numTracksChanged( currentPlaylistInterface()->unfilteredTrackCount() ); emit numTracksChanged( currentPlaylistInterface()->unfilteredTrackCount() );
if ( !currentPlaylistInterface()->filter().isEmpty() ) if ( !currentPage()->filter().isEmpty() )
emit numShownChanged( currentPlaylistInterface()->trackCount() ); emit numShownChanged( currentPlaylistInterface()->trackCount() );
else else
emit numShownChanged( currentPlaylistInterface()->unfilteredTrackCount() ); emit numShownChanged( currentPlaylistInterface()->unfilteredTrackCount() );