Commit afa22078 authored by Ilkka Ollakka's avatar Ilkka Ollakka
Browse files

Restore download cover art context menu that was taken away by my previous

commit. Thou I think it should invalidate current album art, so core would do
new search for it.
parent 8cc3d3c2
...@@ -413,10 +413,21 @@ CoverArtLabel::CoverArtLabel( QWidget *parent, intf_thread_t *_p_i ) ...@@ -413,10 +413,21 @@ CoverArtLabel::CoverArtLabel( QWidget *parent, intf_thread_t *_p_i )
setMaximumHeight( 128 ); setMaximumHeight( 128 );
setMaximumWidth( 128 ); setMaximumWidth( 128 );
setScaledContents( true ); setScaledContents( true );
QList< QAction* > artActions = actions();
QAction *action = new QAction( qtr( "Download cover art" ), this );
addAction( action );
CONNECT( action, triggered(), this, doUpdate() );
doUpdate(); doUpdate();
} }
CoverArtLabel::~CoverArtLabel()
{
QList< QAction* > artActions = actions();
foreach( QAction *act, artActions )
removeAction( act );
}
void CoverArtLabel::doUpdate( QString url ) void CoverArtLabel::doUpdate( QString url )
{ {
QPixmap pix; QPixmap pix;
......
...@@ -194,7 +194,7 @@ class CoverArtLabel : public QLabel ...@@ -194,7 +194,7 @@ class CoverArtLabel : public QLabel
Q_OBJECT Q_OBJECT
public: public:
CoverArtLabel( QWidget *parent, intf_thread_t * ); CoverArtLabel( QWidget *parent, intf_thread_t * );
virtual ~CoverArtLabel(){}; virtual ~CoverArtLabel();
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment