1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-17 22:38:33 +01:00

Add a copy link icon, then add more icons to context menu

This commit is contained in:
Jason Herskowitz 2014-09-08 19:32:13 -04:00
parent a4dc4e8c76
commit 5ec01450ff
3 changed files with 19 additions and 5 deletions

13
data/images/copy.svg Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<title>copy</title>
<description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Group" sketch:type="MSLayerGroup" transform="translate(0.000000, 18.000000)" fill="#000000">
<path d="M17.4265921,9.48144531 L17.4265921,13.5374454 C17.4265921,14.7987787 18.4178779,15.8281121 19.6354494,15.8281121 L44.020306,15.8281121 C45.2378775,15.8281121 46.2291632,14.8001121 46.2278774,13.5374454 L46.2278774,9.48277887 C46.2278774,8.2147789 45.2378775,7.19211213 44.020306,7.19211213 L19.6354494,7.19211213 C18.4165388,7.19335938 17.4265921,8.21451823 17.4265921,9.48144531 C17.4265921,9.48144531 17.4265921,8.21451823 17.4265921,9.48144531 L17.4265921,9.48144531 M20.0738264,9.9358724 L43.5779694,9.9358724 L43.5779694,13.0812057 L20.0738264,13.0812057 L20.0738264,9.9358724 L20.0738264,9.9358724 L20.0738264,9.9358724" id="Shape" sketch:type="MSShapeGroup"></path>
<path d="M23.9516078,19.0120443 L4.58617892,19.0120443 L4.58617892,4.0093778 L23.9516078,4.0093778 L28.3641792,4.0093778 L28.3641792,2.55337779 C28.3641792,0.832044442 27.0141792,-0.567955653 25.3530363,-0.567955653 L3.1860373,-0.567955653 C1.52618015,-0.567955653 0.174894435,0.832044284 0.174894435,2.55337779 L0.174894435,20.4667117 C0.174894435,22.1867116 1.52618015,23.5880451 3.18475168,23.5880451 L25.3543231,23.5880451 C27.0116089,23.5880451 28.3628945,22.1867118 28.365466,20.4653784 L28.365466,19.0093784 L23.9528947,19.0093784 L23.9528947,19.0120443 L23.9528947,19.0120443 L23.9516078,19.0120443" id="Shape" sketch:type="MSShapeGroup"></path>
<path d="M62.6001761,0.347981771 C62.0318904,-0.242684881 61.2746047,-0.568018198 60.4684619,-0.568018198 L38.3027479,-0.568018198 C36.6428907,-0.568018198 35.291605,0.831981738 35.291605,2.55331524 L35.291605,4.00931525 L39.7041763,4.00931525 L59.0696052,4.00931525 L59.0696052,19.0093153 L43.1074624,19.0119819 L39.7054626,19.0119819 L35.2928912,19.0119819 L35.2928912,20.4653153 C35.2928912,22.1866486 36.6441769,23.587982 38.3040341,23.5906488 L60.4723206,23.5879821 C61.2771777,23.5879821 62.0344635,23.2599821 62.6027491,22.6706487 C63.1684633,22.0786487 63.4834633,21.2946488 63.4821776,20.4666487 L63.4821776,2.55864906 C63.4821429,1.72526042 63.1684047,0.940104167 62.6001761,0.347981771 C62.6001761,0.347981771 63.1684047,0.940104167 62.6001761,0.347981771 L62.6001761,0.347981771" id="Shape" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -201,5 +201,6 @@
<file>data/images/beatsmusic.svg</file>
<file>data/images/ipv6-logo.svg</file>
<file>data/images/whatsnew.svg</file>
<file>data/images/copy.svg</file>
</qresource>
</RCC>

View File

@ -123,7 +123,7 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
m_sigmap->setMapping( addAction( ImageRegistry::instance()->icon( RESPATH "images/play.svg" ), tr( "&Play" ) ), ActionPlay );
if ( m_supportedActions & ActionQueue )
m_sigmap->setMapping( addAction( tr( "Add to &Queue" ) ), ActionQueue );
m_sigmap->setMapping( addAction( ImageRegistry::instance()->icon( RESPATH "images/queue.svg" ), tr( "Add to &Queue" ) ), ActionQueue );
if ( m_supportedActions & ActionPlaylist )
{
@ -136,7 +136,7 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
m_playlists_sigmap = new QSignalMapper( this );
// Build the menu listing all available playlists
QMenu* playlistMenu = addMenu( tr( "Add to &Playlist" ) );
QMenu* playlistMenu = addMenu( ImageRegistry::instance()->icon( RESPATH "images/playlist-icon.svg" ), tr( "Add to &Playlist" ) );
for ( int i = 0; i < m_playlists.length(); ++i )
{
QAction* action = new QAction( m_playlists.at( i )->title() , this );
@ -157,7 +157,7 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
m_sources_sigmap->deleteLater();
m_sources_sigmap = new QSignalMapper( this );
QMenu* sourcesMenu = addMenu( tr( "Send to &Friend" ) );
QMenu* sourcesMenu = addMenu( ImageRegistry::instance()->icon( RESPATH "images/inbox.svg" ), tr( "Send to &Friend" ) );
for ( int i = 0; i < m_sources.length(); ++i )
{
QAction* action = new QAction( m_sources.at( i )->friendlyName(), this );
@ -209,10 +209,10 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
addSeparator();
if ( m_supportedActions & ActionCopyLink && itemCount() == 1 )
m_sigmap->setMapping( addAction( tr( "&Copy Track Link" ) ), ActionCopyLink );
m_sigmap->setMapping( addAction( ImageRegistry::instance()->icon( RESPATH "images/copy.svg" ), tr( "&Copy Track Link" ) ), ActionCopyLink );
if ( m_supportedActions & ActionEditMetadata && itemCount() == 1 )
m_sigmap->setMapping( addAction( tr( "Properties..." ) ), ActionEditMetadata );
m_sigmap->setMapping( addAction( ImageRegistry::instance()->icon( RESPATH "images/info.svg" ), tr( "Properties..." ) ), ActionEditMetadata );
addSeparator();