aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/General/notifier/popupwidget.cpp13
-rw-r--r--src/plugins/General/notifier/popupwidget.h1
-rw-r--r--src/qmmp/abstractdetailsdialog.cpp1
3 files changed, 11 insertions, 4 deletions
diff --git a/src/plugins/General/notifier/popupwidget.cpp b/src/plugins/General/notifier/popupwidget.cpp
index b3653b95d..0d3c8f13e 100644
--- a/src/plugins/General/notifier/popupwidget.cpp
+++ b/src/plugins/General/notifier/popupwidget.cpp
@@ -28,6 +28,7 @@
#include <QDir>
#include <QApplication>
#include <qmmp/soundcore.h>
+#include <qmmp/decoder.h>
#include "popupwidget.h"
@@ -39,10 +40,10 @@ PopupWidget::PopupWidget(QWidget *parent)
setFrameStyle(QFrame::Box | QFrame::Plain);
QHBoxLayout *hlayout = new QHBoxLayout(this);
- QLabel *pixlabel = new QLabel(this);
- pixlabel->setPixmap(QPixmap(":/notifier_icon.png"));
- pixlabel->setFixedSize(32,32);
- hlayout->addWidget(pixlabel);
+ m_pixlabel = new QLabel(this);
+ m_pixlabel->setPixmap(QPixmap(":/notifier_icon.png"));
+ m_pixlabel->setFixedSize(32,32);
+ hlayout->addWidget(m_pixlabel);
//layout
QVBoxLayout *vlayout = new QVBoxLayout();
hlayout->addLayout (vlayout);
@@ -100,6 +101,10 @@ void PopupWidget::showMetaData()
}
else
m_label2->hide();
+
+ QPixmap pix = Decoder::findCover(core->metaData(Qmmp::URL));
+ if(!pix.isNull())
+ m_pixlabel->setPixmap(pix.scaled(32,32));
qApp->processEvents();
resize(sizeHint());
qApp->processEvents();
diff --git a/src/plugins/General/notifier/popupwidget.h b/src/plugins/General/notifier/popupwidget.h
index 989b37bd7..d059c4661 100644
--- a/src/plugins/General/notifier/popupwidget.h
+++ b/src/plugins/General/notifier/popupwidget.h
@@ -61,6 +61,7 @@ private:
QTimer *m_timer;
QLabel *m_label1;
QLabel *m_label2;
+ QLabel *m_pixlabel;
uint m_pos;
};
diff --git a/src/qmmp/abstractdetailsdialog.cpp b/src/qmmp/abstractdetailsdialog.cpp
index 39f199e9a..70bf07de3 100644
--- a/src/qmmp/abstractdetailsdialog.cpp
+++ b/src/qmmp/abstractdetailsdialog.cpp
@@ -154,6 +154,7 @@ const QString AbstractDetailsDialog::strMetaData(Qmmp::MetaData key)
case Qmmp::URL:
return ui->pathLineEdit->text();
}
+ return QString();
}
int AbstractDetailsDialog::intMetaData(Qmmp::MetaData key)