1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

* Use new RecentlyPlayedModel API.

This commit is contained in:
Christian Muehlhaeuser
2012-06-26 03:05:28 +02:00
parent 035e59e0b5
commit e4e3b0f825

View File

@@ -305,7 +305,7 @@ ViewManager::show( const Tomahawk::collection_ptr& collection )
view = new TreeView(); view = new TreeView();
TreeModel* model = new TreeModel(); TreeModel* model = new TreeModel();
view->setTreeModel( model ); view->setTreeModel( model );
if ( collection && collection->source()->isLocal() ) if ( collection && collection->source()->isLocal() )
view->setEmptyTip( tr( "After you have scanned your music collection you will find your tracks right here." ) ); view->setEmptyTip( tr( "After you have scanned your music collection you will find your tracks right here." ) );
else else
@@ -483,7 +483,7 @@ ViewManager::showRecentPlaysPage()
{ {
PlaylistView* pv = new PlaylistView( m_widget ); PlaylistView* pv = new PlaylistView( m_widget );
RecentlyPlayedModel* raModel = new RecentlyPlayedModel( source_ptr(), pv ); RecentlyPlayedModel* raModel = new RecentlyPlayedModel( pv );
raModel->setTitle( tr( "Recently Played Tracks" ) ); raModel->setTitle( tr( "Recently Played Tracks" ) );
raModel->setDescription( tr( "Recently played tracks from all your friends" ) ); raModel->setDescription( tr( "Recently played tracks from all your friends" ) );
raModel->setStyle( PlayableModel::Large ); raModel->setStyle( PlayableModel::Large );
@@ -493,6 +493,7 @@ ViewManager::showRecentPlaysPage()
pv->setItemDelegate( del ); pv->setItemDelegate( del );
pv->setPlaylistModel( raModel ); pv->setPlaylistModel( raModel );
raModel->setSource( source_ptr() );
m_recentPlaysWidget = pv; m_recentPlaysWidget = pv;
} }