aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-09 00:33:46 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-01-09 01:08:26 +0800
commitbed514dd862a5b7968d42c0cfb2bd3afe46e4d84 (patch)
tree4cee190e64a633b53cf529c67f904c0d0b9d58db /calendar
parent8a2c950b83f79f8394c928199c5bead4d5bd5da8 (diff)
downloadgsoc2013-evolution-bed514dd862a5b7968d42c0cfb2bd3afe46e4d84.tar.gz
gsoc2013-evolution-bed514dd862a5b7968d42c0cfb2bd3afe46e4d84.tar.zst
gsoc2013-evolution-bed514dd862a5b7968d42c0cfb2bd3afe46e4d84.zip
Bug 691047 - Support notification filtering
For compliance with: https://live.gnome.org/GnomeGoals/NotificationSource
Diffstat (limited to 'calendar')
-rw-r--r--calendar/alarm-notify/alarm-queue.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/calendar/alarm-notify/alarm-queue.c b/calendar/alarm-notify/alarm-queue.c
index 18bd49e6e0..2270879646 100644
--- a/calendar/alarm-notify/alarm-queue.c
+++ b/calendar/alarm-notify/alarm-queue.c
@@ -1724,7 +1724,7 @@ popup_notification (time_t trigger,
gchar *str, *start_str, *end_str, *alarm_str, *time_str;
icaltimezone *current_zone;
ECalComponentOrganizer organiser;
- NotifyNotification *n;
+ NotifyNotification *notify;
gchar *body;
debug (("..."));
@@ -1780,9 +1780,17 @@ popup_notification (time_t trigger,
"%s %s", start_str, time_str);
}
- n = notify_notification_new (summary, body, "appointment-soon");
- if (!notify_notification_show (n, NULL))
- g_warning ("Could not send notification to daemon\n");
+ notify = notify_notification_new (summary, body, "appointment-soon");
+
+ /* If the user wants Evolution notifications suppressed, honor
+ * it even though evolution-alarm-notify is a separate process
+ * with its own .desktop file. */
+ notify_notification_set_hint (
+ notify, "desktop-entry",
+ g_variant_new_string (PACKAGE));
+
+ if (!notify_notification_show (notify, NULL))
+ g_warning ("Could not send notification to daemon\n");
/* create the private structure */
g_free (start_str);