mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 15:47:38 +02:00
* ContextMenu can now pass a PlaylistInterface onto the MetadataEditor.
This commit is contained in:
@@ -262,7 +262,7 @@ ContextMenu::onTriggered( int action )
|
|||||||
|
|
||||||
case ActionEditMetadata:
|
case ActionEditMetadata:
|
||||||
if ( !m_queries.first()->results().isEmpty() ) {
|
if ( !m_queries.first()->results().isEmpty() ) {
|
||||||
MetadataEditor* d = new MetadataEditor( m_queries.first()->results().first(), this );
|
MetadataEditor* d = new MetadataEditor( m_queries.first()->results().first(), m_interface, this );
|
||||||
d->show();
|
d->show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -347,3 +347,10 @@ ContextMenu::onSocialActionsLoaded()
|
|||||||
m_loveAction->setIcon( QIcon( RESPATH "images/loved.png" ) );
|
m_loveAction->setIcon( QIcon( RESPATH "images/loved.png" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ContextMenu::setPlaylistInterface( const Tomahawk::playlistinterface_ptr& interface )
|
||||||
|
{
|
||||||
|
m_interface = interface;
|
||||||
|
}
|
||||||
|
@@ -52,6 +52,8 @@ public:
|
|||||||
int supportedActions() const { return m_supportedActions; }
|
int supportedActions() const { return m_supportedActions; }
|
||||||
void setSupportedActions( int actions ) { m_supportedActions = actions; }
|
void setSupportedActions( int actions ) { m_supportedActions = actions; }
|
||||||
|
|
||||||
|
void setPlaylistInterface( const Tomahawk::playlistinterface_ptr& interface );
|
||||||
|
|
||||||
void setQuery( const Tomahawk::query_ptr& query );
|
void setQuery( const Tomahawk::query_ptr& query );
|
||||||
void setQueries( const QList<Tomahawk::query_ptr>& queries );
|
void setQueries( const QList<Tomahawk::query_ptr>& queries );
|
||||||
|
|
||||||
@@ -82,9 +84,11 @@ private:
|
|||||||
|
|
||||||
QAction* m_loveAction;
|
QAction* m_loveAction;
|
||||||
|
|
||||||
QList<Tomahawk::query_ptr> m_queries;
|
QList< Tomahawk::query_ptr > m_queries;
|
||||||
QList<Tomahawk::artist_ptr> m_artists;
|
QList< Tomahawk::artist_ptr > m_artists;
|
||||||
QList<Tomahawk::album_ptr> m_albums;
|
QList< Tomahawk::album_ptr > m_albums;
|
||||||
|
|
||||||
|
Tomahawk::playlistinterface_ptr m_interface;
|
||||||
};
|
};
|
||||||
|
|
||||||
}; // ns
|
}; // ns
|
||||||
|
Reference in New Issue
Block a user