[Notifications] Rename device name to origin name

This makes it a bit more generic. Advertise that this may also be used to indicate what email account a notification came from.

Differential Revision: https://phabricator.kde.org/D21137
wilder-5.19
Kai Uwe Broulik 7 years ago
parent 2575b7394a
commit 9d0f3b37fc
  1. 2
      applets/notifications/package/contents/ui/FullRepresentation.qml
  2. 4
      applets/notifications/package/contents/ui/NotificationHeader.qml
  3. 2
      applets/notifications/package/contents/ui/NotificationItem.qml
  4. 2
      applets/notifications/package/contents/ui/NotificationPopup.qml
  5. 2
      applets/notifications/package/contents/ui/global/Globals.qml
  6. 6
      libnotificationmanager/notification.cpp
  7. 2
      libnotificationmanager/notification.h
  8. 2
      libnotificationmanager/notification_p.h
  9. 2
      libnotificationmanager/notifications.h
  10. 2
      libnotificationmanager/notificationsmodel.cpp
  11. 2
      libnotificationmanager/server_p.cpp

@ -446,7 +446,7 @@ ColumnLayout{
applicationName: model.applicationName
applicationIconSource: model.applicationIconName
deviceName: model.deviceName || ""
originName: model.originName || ""
time: model.updated || model.created

@ -39,7 +39,7 @@ RowLayout {
property var applicationIconSource
property string applicationName
property string deviceName
property string originName
property string configureActionLabel
@ -88,7 +88,7 @@ RowLayout {
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 {

@ -43,7 +43,7 @@ ColumnLayout {
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

@ -37,7 +37,7 @@ PlasmaCore.Dialog {
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

@ -328,7 +328,7 @@ QtObject {
applicationName: model.applicationName
applicationIconSource: model.applicationIconName
deviceName: model.deviceName || ""
originName: model.originName || ""
time: model.updated || model.created

@ -330,7 +330,7 @@ void Notification::Private::processHints(const QVariantMap &hints)
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 @@ void Notification::setApplicationIconName(const QString &applicationIconName)
d->applicationIconName = applicationIconName;
}
QString Notification::deviceName() const
QString Notification::originName() const
{
return d->deviceName;
return d->originName;
}
QStringList Notification::actionNames() const

@ -81,7 +81,7 @@ public:
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;

@ -67,7 +67,7 @@ public:
bool configurableService = false;
QString applicationIconName;
QString deviceName;
QString originName;
QStringList actionNames;
QStringList actionLabels;

@ -231,7 +231,7 @@ public:
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.

@ -292,7 +292,7 @@ QVariant NotificationsModel::data(const QModelIndex &index, int role) const
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();

@ -177,7 +177,7 @@ QStringList ServerPrivate::GetCapabilities() const
QStringLiteral("actions"),
QStringLiteral("x-kde-urls"),
QStringLiteral("x-kde-device-name"),
QStringLiteral("x-kde-origin-name"),
QStringLiteral("x-kde-display-appname"),
QStringLiteral("inhibitions")

Loading…
Cancel
Save