summaryrefslogtreecommitdiff
path: root/src/capplet/mate-notification-applet-history.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2025-08-29 09:14:41 -0400
committerLuke from DC <[email protected]>2025-10-10 02:11:17 +0000
commit2dd24f923f4d4f2bbc77314445a6b1b6701b3569 (patch)
treed9626b8d46c6c09fa5bb5c3195da2bbd2e3f3a5d /src/capplet/mate-notification-applet-history.c
parentfe37d06ad1987f139d98a7b7e0a22aa96fe7260b (diff)
downloadmate-notification-daemon-2dd24f923f4d4f2bbc77314445a6b1b6701b3569.tar.bz2
mate-notification-daemon-2dd24f923f4d4f2bbc77314445a6b1b6701b3569.tar.xz
history: Add enable/disable toggle
This helps a bit with privacy. By disabling history, it wipes all notifications in the D-Bus buffer and prevents further storage. The history popup is also disabled. Notification storage resumes when history is enabled. Note that this just prevents the mate-notifications-daemon from storing notifications, but it doesn't prevent other processes from capturing them elsewhere.
Diffstat (limited to 'src/capplet/mate-notification-applet-history.c')
-rw-r--r--src/capplet/mate-notification-applet-history.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/capplet/mate-notification-applet-history.c b/src/capplet/mate-notification-applet-history.c
index cca03d6..ce38a6f 100644
--- a/src/capplet/mate-notification-applet-history.c
+++ b/src/capplet/mate-notification-applet-history.c
@@ -245,6 +245,12 @@ show_notification_history (MateNotificationHistoryContext *context)
return;
}
+ /* Check if history is enabled */
+ if (context->settings && !g_settings_get_boolean (context->settings, GSETTINGS_KEY_HISTORY_ENABLED)) {
+ g_warning ("Cannot show history: history is disabled for privacy");
+ return;
+ }
+
/* If popup already exists, destroy it (basically toggle off) */
if (context->history_popup) {
gtk_widget_destroy (context->history_popup);