mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Fix name and set desktop entry for notifications
Summary: With the Plasma notification rewrite the name passed with the notification is user-visible, so use "Falkon" instead of "falkon here". Also pass the desktop entry. This allows Plasma to embed the app icon in the notification Test Plan: Before: {F6815655} After: {F6815657} Reviewers: #falkon, drosca Reviewed By: #falkon, drosca Subscribers: kossebau, broulik, falkon Tags: #falkon Differential Revision: https://phabricator.kde.org/D21087
This commit is contained in:
parent
3bc0c165af
commit
e3cca98e0d
@ -90,15 +90,19 @@ void DesktopNotificationsFactory::showNotification(const QPixmap &icon, const QS
|
||||
tmp.open(QFile::WriteOnly);
|
||||
icon.save(tmp.fileName());
|
||||
|
||||
const QVariantMap hints {
|
||||
{QStringLiteral("desktop-entry"), QGuiApplication::desktopFileName()}
|
||||
};
|
||||
|
||||
QDBusInterface dbus("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications", QDBusConnection::sessionBus());
|
||||
QVariantList args;
|
||||
args.append(QLatin1String("falkon"));
|
||||
args.append(QLatin1String("Falkon"));
|
||||
args.append(m_uint);
|
||||
args.append(tmp.fileName());
|
||||
args.append(heading);
|
||||
args.append(text);
|
||||
args.append(QStringList());
|
||||
args.append(QVariantMap());
|
||||
args.append(hints);
|
||||
args.append(m_timeout);
|
||||
dbus.callWithCallback("Notify", args, this, SLOT(updateLastId(QDBusMessage)), SLOT(error(QDBusError)));
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user