make the freedesktop backend use desktop-entry
This commit is contained in:
parent
ad0b79d544
commit
570208f8dd
|
@ -31,7 +31,8 @@ Application::Application (const QString &name, const Icon &icon) :
|
|||
Application::Application(const Application &other):
|
||||
m_name(other.m_name),
|
||||
m_icon(other.m_icon),
|
||||
m_alerts(other.m_alerts)
|
||||
m_alerts(other.m_alerts),
|
||||
m_hint(other.m_hint)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -73,6 +74,11 @@ Hint &Application::hints()
|
|||
return m_hint;
|
||||
}
|
||||
|
||||
const Hint &Application::hints() const
|
||||
{
|
||||
return m_hint;
|
||||
}
|
||||
|
||||
Alert::Alert (const QString &name, const QString &title, const Icon &icon, bool active):
|
||||
m_name(name),
|
||||
m_title(title),
|
||||
|
|
|
@ -58,9 +58,9 @@ public:
|
|||
const Icon &icon() const;
|
||||
const QHash<QString,Alert> &alerts() const;
|
||||
bool isValid() const;
|
||||
|
||||
Hint &hints();
|
||||
|
||||
|
||||
const Hint &hints() const;
|
||||
private:
|
||||
QString m_name;
|
||||
Icon m_icon;
|
||||
|
|
|
@ -20,8 +20,12 @@
|
|||
|
||||
using namespace Snore;
|
||||
|
||||
Hint::Hint(QObject *parent) :
|
||||
QObject(parent)
|
||||
Hint::Hint()
|
||||
{
|
||||
}
|
||||
|
||||
Hint::Hint(const Hint &other):
|
||||
m_data(other.m_data)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@ namespace Snore
|
|||
{
|
||||
|
||||
|
||||
class SNORE_EXPORT Hint : public QObject
|
||||
class SNORE_EXPORT Hint
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Hint(QObject *parent = 0);
|
||||
Hint();
|
||||
Hint(const Hint &other);
|
||||
|
||||
void setValue(const QString &key, const QVariant &value);
|
||||
QVariant value(const QString & key, const QVariant & defaultValue = QVariant() ) const;
|
||||
|
|
|
@ -55,6 +55,11 @@ void FreedesktopBackend::slotNotify ( Notification noti )
|
|||
hints["urgency"] = (char)noti.priority()+1;
|
||||
}
|
||||
|
||||
if(snore()->aplications().value(noti.application()).hints().contains("desktop-entry"))
|
||||
{
|
||||
hints["desktop-entry"] = snore()->aplications()[noti.application()].hints().value("desktop-entry");
|
||||
}
|
||||
|
||||
uint updateId = 0;
|
||||
if(noti.updateID() != 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue