diff --git a/data/notifications.gschema.xml b/data/notifications.gschema.xml index 7ffe2f4c..6574c769 100644 --- a/data/notifications.gschema.xml +++ b/data/notifications.gschema.xml @@ -1,6 +1,10 @@ + + [] + Applications that have sent notifications. Used in the switchboard + false Disable all notifications @@ -24,5 +28,9 @@ true Show missed notifications in notification center + + true + Does a corresponding .desktop entry file exist + diff --git a/src/DBus.vala b/src/DBus.vala index 2ffbd735..12ca3af4 100644 --- a/src/DBus.vala +++ b/src/DBus.vala @@ -114,6 +114,12 @@ public class Notifications.Server : Object { } else { var notification = new Notifications.Notification (app_name, app_icon, summary, body, actions, hints); + var apps = settings.get_strv("applications"); + if (!(notification.app_id in apps)) { + apps += notification.app_id; + settings.set_strv("applications", apps); + } + if (!settings.get_boolean ("do-not-disturb") || notification.priority == GLib.NotificationPriority.URGENT) { var app_settings = new GLib.Settings.full ( SettingsSchemaSource.get_default ().lookup ("io.elementary.notifications.applications", true),