mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 21:27:58 +02:00
* Add 'Copy Artist/Album Link' context menu items.
This commit is contained in:
@@ -151,8 +151,8 @@ ContextMenu::setAlbums( const QList<Tomahawk::album_ptr>& albums )
|
|||||||
|
|
||||||
addSeparator();
|
addSeparator();
|
||||||
|
|
||||||
/* if ( m_supportedActions & ActionCopyLink && itemCount() == 1 )
|
if ( m_supportedActions & ActionCopyLink && itemCount() == 1 )
|
||||||
m_sigmap->setMapping( addAction( tr( "Copy Album &Link" ) ), ActionCopyLink ); */
|
m_sigmap->setMapping( addAction( tr( "Copy Album &Link" ) ), ActionCopyLink );
|
||||||
|
|
||||||
foreach ( QAction* action, actions() )
|
foreach ( QAction* action, actions() )
|
||||||
{
|
{
|
||||||
@@ -193,8 +193,8 @@ ContextMenu::setArtists( const QList<Tomahawk::artist_ptr>& artists )
|
|||||||
|
|
||||||
addSeparator();
|
addSeparator();
|
||||||
|
|
||||||
/* if ( m_supportedActions & ActionCopyLink && itemCount() == 1 )
|
if ( m_supportedActions & ActionCopyLink && itemCount() == 1 )
|
||||||
m_sigmap->setMapping( addAction( tr( "Copy Artist &Link" ) ), ActionCopyLink ); */
|
m_sigmap->setMapping( addAction( tr( "Copy Artist &Link" ) ), ActionCopyLink );
|
||||||
|
|
||||||
foreach ( QAction* action, actions() )
|
foreach ( QAction* action, actions() )
|
||||||
{
|
{
|
||||||
@@ -274,6 +274,14 @@ ContextMenu::copyLink()
|
|||||||
{
|
{
|
||||||
GlobalActionManager::instance()->copyToClipboard( m_queries.first() );
|
GlobalActionManager::instance()->copyToClipboard( m_queries.first() );
|
||||||
}
|
}
|
||||||
|
else if ( m_albums.count() )
|
||||||
|
{
|
||||||
|
GlobalActionManager::instance()->copyOpenLink( m_albums.first() );
|
||||||
|
}
|
||||||
|
else if ( m_artists.count() )
|
||||||
|
{
|
||||||
|
GlobalActionManager::instance()->copyOpenLink( m_artists.first() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user