diff --git a/kcms/notifications/package/contents/ui/ApplicationConfiguration.qml b/kcms/notifications/package/contents/ui/ApplicationConfiguration.qml --- a/kcms/notifications/package/contents/ui/ApplicationConfiguration.qml +++ b/kcms/notifications/package/contents/ui/ApplicationConfiguration.qml @@ -35,6 +35,8 @@ property var rootIndex + readonly property string otherAppsId: "@other" + readonly property string appDisplayName: kcm.sourcesModel.data(rootIndex, Qt.DisplayRole) || "" readonly property string appIconName: kcm.sourcesModel.data(rootIndex, Qt.DecorationRole) || "" readonly property string desktopEntry: kcm.sourcesModel.data(rootIndex, Private.SourcesModel.DesktopEntryRole) || "" @@ -117,13 +119,14 @@ QtControls.CheckBox { text: i18n("Show notification badges") - enabled: !!configColumn.desktopEntry + enabled: !!configColumn.desktopEntry && configColumn.desktopEntry !== configColumn.otherAppsId checked: configColumn.behavior & NotificationManager.Settings.ShowBadges onClicked: configColumn.setBehavior(NotificationManager.Settings.ShowBadges, checked) } Kirigami.Separator { Kirigami.FormData.isSection: true + visible: configureEventsButton.visible || noEventsLabel.visible } QtControls.Button { @@ -136,11 +139,12 @@ } QtControls.Label { + id: noEventsLabel Layout.alignment: Qt.AlignHCenter Layout.preferredWidth: form.implicitWidth text: i18n("This application does not support configuring notifications on a per-event basis."); wrapMode: Text.WordWrap - visible: !configColumn.notifyRcName + visible: !configColumn.notifyRcName && configColumn.desktopEntry !== configColumn.otherAppsId } // compact layout diff --git a/kcms/notifications/sourcesmodel.cpp b/kcms/notifications/sourcesmodel.cpp --- a/kcms/notifications/sourcesmodel.cpp +++ b/kcms/notifications/sourcesmodel.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -346,6 +347,17 @@ }; std::sort(appsData.begin(), appsData.end(), sortData); + + // Fake entry for configuring non-identifyable applications + appsData << SourceData{ + i18n("Other Applications"), + {}, + QStringLiteral("applications-other"), + QString(), + QStringLiteral("@other"), + {} + }; + std::sort(servicesData.begin(), servicesData.end(), sortData); m_data << appsData << servicesData;