diff --git a/applets/notifications/package/contents/ui/FullRepresentation.qml b/applets/notifications/package/contents/ui/FullRepresentation.qml --- a/applets/notifications/package/contents/ui/FullRepresentation.qml +++ b/applets/notifications/package/contents/ui/FullRepresentation.qml @@ -446,7 +446,7 @@ applicationName: model.applicationName applicationIconSource: model.applicationIconName - deviceName: model.deviceName || "" + originName: model.originName || "" time: model.updated || model.created diff --git a/applets/notifications/package/contents/ui/NotificationHeader.qml b/applets/notifications/package/contents/ui/NotificationHeader.qml --- a/applets/notifications/package/contents/ui/NotificationHeader.qml +++ b/applets/notifications/package/contents/ui/NotificationHeader.qml @@ -39,7 +39,7 @@ property var applicationIconSource property string applicationName - property string deviceName + property string originName property string configureActionLabel @@ -88,7 +88,7 @@ Layout.fillWidth: true textFormat: Text.PlainText elide: Text.ElideRight - text: notificationHeading.applicationName + (notificationHeading.deviceName ? " · " + notificationHeading.deviceName : "") + text: notificationHeading.applicationName + (notificationHeading.originName ? " · " + notificationHeading.originName : "") } PlasmaExtras.DescriptiveLabel { diff --git a/applets/notifications/package/contents/ui/NotificationItem.qml b/applets/notifications/package/contents/ui/NotificationItem.qml --- a/applets/notifications/package/contents/ui/NotificationItem.qml +++ b/applets/notifications/package/contents/ui/NotificationItem.qml @@ -43,7 +43,7 @@ property alias applicationIconSource: notificationHeading.applicationIconSource property alias applicationName: notificationHeading.applicationName - property alias deviceName: notificationHeading.deviceName + property alias originName: notificationHeading.originName property string summary property alias time: notificationHeading.time diff --git a/applets/notifications/package/contents/ui/NotificationPopup.qml b/applets/notifications/package/contents/ui/NotificationPopup.qml --- a/applets/notifications/package/contents/ui/NotificationPopup.qml +++ b/applets/notifications/package/contents/ui/NotificationPopup.qml @@ -37,7 +37,7 @@ property alias applicationName: notificationItem.applicationName property alias applicationIconSource: notificationItem.applicationIconSource - property alias deviceName: notificationItem.deviceName + property alias originName: notificationItem.originName property alias time: notificationItem.time diff --git a/applets/notifications/package/contents/ui/global/Globals.qml b/applets/notifications/package/contents/ui/global/Globals.qml --- a/applets/notifications/package/contents/ui/global/Globals.qml +++ b/applets/notifications/package/contents/ui/global/Globals.qml @@ -328,7 +328,7 @@ applicationName: model.applicationName applicationIconSource: model.applicationIconName - deviceName: model.deviceName || "" + originName: model.originName || "" time: model.updated || model.created diff --git a/libnotificationmanager/notification.h b/libnotificationmanager/notification.h --- a/libnotificationmanager/notification.h +++ b/libnotificationmanager/notification.h @@ -81,7 +81,7 @@ QString applicationIconName() const; void setApplicationIconName(const QString &applicationIconName); - QString deviceName() const; + QString originName() const; // should we group the two into a QPair or something? QStringList actionNames() const; diff --git a/libnotificationmanager/notification.cpp b/libnotificationmanager/notification.cpp --- a/libnotificationmanager/notification.cpp +++ b/libnotificationmanager/notification.cpp @@ -330,7 +330,7 @@ applicationName = applicationDisplayName; } - deviceName = hints.value(QStringLiteral("x-kde-device-name")).toString(); + originName = hints.value(QStringLiteral("x-kde-origin-name")).toString(); eventId = hints.value(QStringLiteral("x-kde-eventId")).toString(); @@ -531,9 +531,9 @@ d->applicationIconName = applicationIconName; } -QString Notification::deviceName() const +QString Notification::originName() const { - return d->deviceName; + return d->originName; } QStringList Notification::actionNames() const diff --git a/libnotificationmanager/notification_p.h b/libnotificationmanager/notification_p.h --- a/libnotificationmanager/notification_p.h +++ b/libnotificationmanager/notification_p.h @@ -67,7 +67,7 @@ bool configurableService = false; QString applicationIconName; - QString deviceName; + QString originName; QStringList actionNames; QStringList actionLabels; diff --git a/libnotificationmanager/notifications.h b/libnotificationmanager/notifications.h --- a/libnotificationmanager/notifications.h +++ b/libnotificationmanager/notifications.h @@ -231,7 +231,7 @@ ApplicationNameRole, ///< The user-visible name of the application (e.g. Spectacle) ApplicationIconNameRole, ///< The icon name of the application - DeviceNameRole, ///< The name of the device the notification originally came from, if it was proxied through a sync service like KDE Connect + OriginNameRole, ///< The name of the device or account the notification originally came from, e.g. "My Phone" (in case of device sync) or "foo@example.com" (in case of an email notification) // Jobs JobStateRole, ///< The state of the job, either JobStateJopped, JobStateSuspended, or JobStateRunning. diff --git a/libnotificationmanager/notificationsmodel.cpp b/libnotificationmanager/notificationsmodel.cpp --- a/libnotificationmanager/notificationsmodel.cpp +++ b/libnotificationmanager/notificationsmodel.cpp @@ -292,7 +292,7 @@ case Notifications::ApplicationNameRole: return notification.applicationName(); case Notifications::ApplicationIconNameRole: return notification.applicationIconName(); - case Notifications::DeviceNameRole: return notification.deviceName(); + case Notifications::OriginNameRole: return notification.originName(); case Notifications::ActionNamesRole: return notification.actionNames(); case Notifications::ActionLabelsRole: return notification.actionLabels(); diff --git a/libnotificationmanager/server_p.cpp b/libnotificationmanager/server_p.cpp --- a/libnotificationmanager/server_p.cpp +++ b/libnotificationmanager/server_p.cpp @@ -177,7 +177,7 @@ QStringLiteral("actions"), QStringLiteral("x-kde-urls"), - QStringLiteral("x-kde-device-name"), + QStringLiteral("x-kde-origin-name"), QStringLiteral("x-kde-display-appname"), QStringLiteral("inhibitions")