diff --git a/kcms/notifications/package/contents/ui/main.qml b/kcms/notifications/package/contents/ui/main.qml --- a/kcms/notifications/package/contents/ui/main.qml +++ b/kcms/notifications/package/contents/ui/main.qml @@ -33,6 +33,8 @@ // Sidebar on SourcesPage is 1/3 of the width at a minimum of 12, so assume 3 * 12 = 36 as preferred implicitWidth: Kirigami.Units.gridUnit * 36 + readonly property NotificationManager.ServerInfo currentOwnerInfo: NotificationManager.Server.currentOwner + function openSourcesSettings() { // TODO would be nice to re-use the current SourcesPage instead of pushing a new one that lost all state // but there's no pageAt(index) method in KConfigModuleQml @@ -46,6 +48,31 @@ } Kirigami.FormLayout { + Kirigami.InlineMessage { + Kirigami.FormData.isSection: true + Layout.fillWidth: true + type: Kirigami.MessageType.Error + text: i18n("Could not find a 'Notifications' widget which is required for displaying notifications."); + visible: currentOwnerInfo.status === NotificationManager.ServerInfo.NotRunning + } + + Kirigami.InlineMessage { + Kirigami.FormData.isSection: true + Layout.fillWidth: true + type: Kirigami.MessageType.Information + text: { + if (currentOwnerInfo.vendor && currentOwnerInfo.name) { + return i18nc("Vendor and product name", + "Notifications are currently provided by '%1 %2' instead of Plasma.", + currentOwnerInfo.vendor, currentOwnerInfo.name); + } + + return i18n("Notifications are currently not provided by Plasma."); + } + visible: root.currentOwnerInfo.status === NotificationManager.ServerInfo.Running + && (currentOwnerInfo.vendor !== "KDE" || currentOwnerInfo.name !== "Plasma") + } + QtControls.CheckBox { Kirigami.FormData.label: i18n("Do not disturb:") text: i18nc("Do not disturb when screens are mirrored", "When screens are mirrored")