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

* Properly sort recent additions / albums lists.

This commit is contained in:
Christian Muehlhaeuser 2011-10-19 04:00:54 +02:00
parent 5f1a2df610
commit 6134c4fdec
2 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,7 @@ SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget*
m_recentCollectionModel = new CollectionFlatModel( ui->recentCollectionView );
m_recentCollectionModel->setStyle( TrackModel::Short );
ui->recentCollectionView->setTrackModel( m_recentCollectionModel );
ui->recentCollectionView->sortByColumn( TrackModel::Age, Qt::DescendingOrder );
m_recentCollectionModel->addFilteredCollection( source->collection(), 250, DatabaseCommand_AllTracks::ModificationTime );
m_historyModel = new PlaylistModel( ui->historyView );
@ -66,6 +67,7 @@ SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget*
m_recentAlbumModel = new AlbumModel( ui->recentAlbumView );
ui->recentAlbumView->setAlbumModel( m_recentAlbumModel );
ui->recentAlbumView->proxyModel()->sort( -1 );
m_recentAlbumModel->addFilteredCollection( source->collection(), 20, DatabaseCommand_AllAlbums::ModificationTime );
m_title = tr( "New Additions" );

View File

@ -81,6 +81,7 @@ WelcomeWidget::WelcomeWidget( QWidget* parent )
m_recentAlbumsModel = new AlbumModel( ui->additionsView );
ui->additionsView->setAlbumModel( m_recentAlbumsModel );
ui->additionsView->proxyModel()->sort( -1 );
m_recentAlbumsModel->addFilteredCollection( collection_ptr(), 20, DatabaseCommand_AllAlbums::ModificationTime, true );
m_timer = new QTimer( this );