diff --git a/Modules/Notification/NotificationHistoryPanel.qml b/Modules/Notification/NotificationHistoryPanel.qml index a0704c6..8a2f610 100644 --- a/Modules/Notification/NotificationHistoryPanel.qml +++ b/Modules/Notification/NotificationHistoryPanel.qml @@ -144,10 +144,18 @@ NPanel { Layout.preferredWidth: 28 * scaling Layout.preferredHeight: 28 * scaling Layout.alignment: Qt.AlignVCenter - imagePath: image && image !== "" ? image : "" + imagePath: (image + && image !== "") ? image : ((appIcon + && appIcon !== "") ? AppIcons.iconFromName( + appIcon, + "application-x-executable") : AppIcons.iconForAppId( + desktopEntry || appName, + "application-x-executable")) borderColor: Color.transparent borderWidth: 0 - visible: (image && image !== "") + visible: (image && image !== "") || (appIcon && AppIcons.iconFromName(appIcon, + "application-x-executable") !== "") + || (AppIcons.iconForAppId(desktopEntry || appName, "application-x-executable") !== "") } // Notification content column diff --git a/Services/NotificationService.qml b/Services/NotificationService.qml index db42f73..bf66182 100644 --- a/Services/NotificationService.qml +++ b/Services/NotificationService.qml @@ -161,6 +161,7 @@ Singleton { "summary": notification.summary, "body": notification.body, "appName": resolvedAppName, + "desktopEntry": notification.desktopEntry, "image": resolvedImage, "appIcon": notification.appIcon, "urgency": notification.urgency, @@ -219,7 +220,9 @@ Singleton { "summary": notification.summary, "body": notification.body, "appName": resolvedAppName, + "desktopEntry": notification.desktopEntry || "", "image": resolvedImage, + "appIcon": notification.appIcon || "", "urgency": notification.urgency, "timestamp": new Date() }) @@ -250,7 +253,9 @@ Singleton { "summary": it.summary || "", "body": it.body || "", "appName": it.appName || "", + "desktopEntry": it.desktopEntry || "", "image": it.image || "", + "appIcon": it.appIcon || "", "urgency": it.urgency, "timestamp": ts ? new Date(ts) : new Date() }) @@ -270,7 +275,9 @@ Singleton { "summary": n.summary, "body": n.body, "appName": n.appName, + "desktopEntry": n.desktopEntry, "image": n.image, + "appIcon": n.appIcon, "urgency": n.urgency, "timestamp"// Always persist in milliseconds : (n.timestamp instanceof Date) ? n.timestamp.getTime(