From 2d8ca57fee90fd254c0f82fa402877eaefcbb3fa Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 23 May 2013 15:15:34 +0200 Subject: [PATCH] Use outbox icon when sending tracks. --- resources.qrc | 1 + src/libtomahawk/jobview/InboxJobItem.cpp | 9 ++++++++- src/libtomahawk/utils/TomahawkUtils.h | 3 ++- src/libtomahawk/utils/TomahawkUtilsGui.cpp | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/resources.qrc b/resources.qrc index 100c6a0f7..17cd5b71a 100644 --- a/resources.qrc +++ b/resources.qrc @@ -182,5 +182,6 @@ data/images/station-artist.svg data/images/station-genre.svg data/images/station-year.svg + data/images/outbox.svg diff --git a/src/libtomahawk/jobview/InboxJobItem.cpp b/src/libtomahawk/jobview/InboxJobItem.cpp index bc2c2f3b0..ddd0c5480 100644 --- a/src/libtomahawk/jobview/InboxJobItem.cpp +++ b/src/libtomahawk/jobview/InboxJobItem.cpp @@ -73,5 +73,12 @@ InboxJobItem::mainText() const QPixmap InboxJobItem::icon() const { - return TomahawkUtils::defaultPixmap( TomahawkUtils::Inbox, TomahawkUtils::Original, QSize( 64, 64 ) ); + switch ( m_side ) + { + case Sending: + return TomahawkUtils::defaultPixmap( TomahawkUtils::Outbox, TomahawkUtils::Original, QSize( 64, 64 ) ); + case Receiving: + return TomahawkUtils::defaultPixmap( TomahawkUtils::Inbox, TomahawkUtils::Original, QSize( 64, 64 ) ); + } + return QPixmap(); } diff --git a/src/libtomahawk/utils/TomahawkUtils.h b/src/libtomahawk/utils/TomahawkUtils.h index 86e94ea17..7d86515fe 100644 --- a/src/libtomahawk/utils/TomahawkUtils.h +++ b/src/libtomahawk/utils/TomahawkUtils.h @@ -123,7 +123,8 @@ namespace TomahawkUtils ResolverBundle, Inbox, Invalid, - InboxNewItem + InboxNewItem, + Outbox }; enum ImageMode diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.cpp b/src/libtomahawk/utils/TomahawkUtilsGui.cpp index 198e902e8..3e270df88 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.cpp +++ b/src/libtomahawk/utils/TomahawkUtilsGui.cpp @@ -718,6 +718,9 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size ) case InboxNewItem: pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/new-inbox.svg", size ); break; + case Outbox: + pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/outbox.svg", size ); + break; default: break;