mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 08:04:25 +02:00
Fixed crash in ContextMenu and moved 'open file manager' action up.
This commit is contained in:
@@ -219,10 +219,21 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
|
|||||||
addSeparator();
|
addSeparator();
|
||||||
|
|
||||||
if ( m_supportedActions & ActionCopyLink && itemCount() == 1 )
|
if ( m_supportedActions & ActionCopyLink && itemCount() == 1 )
|
||||||
|
{
|
||||||
m_sigmap->setMapping( addAction( tr( "&Copy Track Link" ) ), ActionCopyLink );
|
m_sigmap->setMapping( addAction( tr( "&Copy Track Link" ) ), ActionCopyLink );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( m_supportedActions & ActionOpenFileManager && queries.length() == 1 &&
|
||||||
|
queries.first()->numResults() &&
|
||||||
|
queries.first()->results().first()->resolvedByCollection()->isLocal() )
|
||||||
|
{
|
||||||
|
m_sigmap->setMapping( addAction( tr( "Open Folder in File Manager..." ) ), ActionOpenFileManager );
|
||||||
|
}
|
||||||
|
|
||||||
if ( m_supportedActions & ActionEditMetadata && itemCount() == 1 )
|
if ( m_supportedActions & ActionEditMetadata && itemCount() == 1 )
|
||||||
|
{
|
||||||
m_sigmap->setMapping( addAction( tr( "Properties..." ) ), ActionEditMetadata );
|
m_sigmap->setMapping( addAction( tr( "Properties..." ) ), ActionEditMetadata );
|
||||||
|
}
|
||||||
|
|
||||||
addSeparator();
|
addSeparator();
|
||||||
|
|
||||||
@@ -244,11 +255,6 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
|
|||||||
|
|
||||||
addSeparator();
|
addSeparator();
|
||||||
|
|
||||||
if ( m_supportedActions & ActionOpenFileManager && queries.length() == 1 && m_queries.first()->results().first()->resolvedByCollection()->isLocal() )
|
|
||||||
{
|
|
||||||
m_sigmap->setMapping( addAction( tr( "Open Folder in File Manager..." ) ), ActionOpenFileManager );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( m_supportedActions & ActionDelete )
|
if ( m_supportedActions & ActionDelete )
|
||||||
m_sigmap->setMapping( addAction( queries.count() > 1 ? tr( "&Remove Items" ) : tr( "&Remove Item" ) ), ActionDelete );
|
m_sigmap->setMapping( addAction( queries.count() > 1 ? tr( "&Remove Items" ) : tr( "&Remove Item" ) ), ActionDelete );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user