From 08610eee13a5c12610c16a6bd8fad7a541de887d Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Fri, 21 Oct 2011 17:34:01 -0400 Subject: [PATCH] Use artist and album icons for temp pages --- resources.qrc | 3 +++ src/sourcetree/items/temporarypageitem.cpp | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/resources.qrc b/resources.qrc index f994d9456..02ee5f9ab 100644 --- a/resources.qrc +++ b/resources.qrc @@ -92,6 +92,9 @@ data/images/artist-icon.png data/images/album-icon.png data/images/search-icon.png + data/images/star-hover.png + data/images/starred.png + data/images/star-unstarred.png data/images/track-icon-22x22.png data/images/track-icon-32x32.png data/images/track-icon-16x16.png diff --git a/src/sourcetree/items/temporarypageitem.cpp b/src/sourcetree/items/temporarypageitem.cpp index 6ae083aa1..d1d4beaca 100644 --- a/src/sourcetree/items/temporarypageitem.cpp +++ b/src/sourcetree/items/temporarypageitem.cpp @@ -17,7 +17,9 @@ */ #include "temporarypageitem.h" -#include +#include "viewmanager.h" +#include "widgets/infowidgets/AlbumInfoWidget.h" +#include "widgets/infowidgets/ArtistInfoWidget.h" using namespace Tomahawk; @@ -27,6 +29,11 @@ TemporaryPageItem::TemporaryPageItem ( SourcesModel* mdl, SourceTreeItem* parent , m_icon( QIcon( RESPATH "images/playlist-icon.png" ) ) , m_sortValue( sortValue ) { + if ( dynamic_cast< ArtistInfoWidget* >( page ) ) + m_icon = QIcon( RESPATH "images/artist-icon.png" ); + else if ( dynamic_cast< AlbumInfoWidget* >( page ) ) + m_icon = QIcon( RESPATH "images/album-icon.png" ); + model()->linkSourceItemToPage( this, page ); }