mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
* Use TrackItemDelegate instead of PlaylistLargeItemDelegate.
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#include "playlist/FlexibleView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/TopLovedTracksModel.h"
|
||||
#include "playlist/PlaylistLargeItemDelegate.h"
|
||||
#include "playlist/TrackItemDelegate.h"
|
||||
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/Logger.h"
|
||||
@@ -79,7 +79,7 @@ LovedTracksItem::activate()
|
||||
TopLovedTracksModel* raModel = new TopLovedTracksModel( pv );
|
||||
raModel->setTitle( text() );
|
||||
|
||||
PlaylistLargeItemDelegate* del = new PlaylistLargeItemDelegate( PlaylistLargeItemDelegate::LovedTracks, pv->trackView(), pv->trackView()->proxyModel() );
|
||||
TrackItemDelegate* del = new TrackItemDelegate( TrackItemDelegate::LovedTracks, pv->trackView(), pv->trackView()->proxyModel() );
|
||||
pv->trackView()->setPlaylistItemDelegate( del );
|
||||
|
||||
pv->setEmptyTip( tr( "Sorry, we could not find any loved tracks!" ) );
|
||||
|
@@ -86,7 +86,7 @@ SourceItem::SourceItem( SourcesModel* mdl, SourceTreeItem* parent, const Tomahaw
|
||||
boost::bind( &SourceItem::latestAdditionsClicked, this ),
|
||||
boost::bind( &SourceItem::getLatestAdditionsPage, this ) );
|
||||
|
||||
m_recentPlaysItem = new GenericPageItem( model(), this, tr( "Recently Played" ), ImageRegistry::instance()->icon( RESPATH "images/recently-played.svg" ),
|
||||
m_recentPlaysItem = new GenericPageItem( model(), this, tr( "History" ), ImageRegistry::instance()->icon( RESPATH "images/recently-played.svg" ),
|
||||
boost::bind( &SourceItem::recentPlaysClicked, this ),
|
||||
boost::bind( &SourceItem::getRecentPlaysPage, this ) );
|
||||
|
||||
@@ -615,8 +615,8 @@ SourceItem::latestAdditionsClicked()
|
||||
else
|
||||
raModel->setDescription( tr( "Latest additions to %1's collection" ).arg( m_source->friendlyName() ) );
|
||||
|
||||
PlaylistLargeItemDelegate* del = new PlaylistLargeItemDelegate( PlaylistLargeItemDelegate::LatestAdditions, pv->trackView(), pv->trackView()->proxyModel() );
|
||||
pv->trackView()->setPlaylistItemDelegate( del );
|
||||
/* PlaylistLargeItemDelegate* del = new PlaylistLargeItemDelegate( PlaylistLargeItemDelegate::LatestAdditions, pv->trackView(), pv->trackView()->proxyModel() );
|
||||
pv->trackView()->setPlaylistItemDelegate( del );*/
|
||||
|
||||
pv->setPlayableModel( raModel );
|
||||
pv->trackView()->sortByColumn( PlayableModel::Age, Qt::DescendingOrder );
|
||||
|
Reference in New Issue
Block a user