From 16a88711a5d28bc19fa0fac6b5b7211bd8d99461 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Mon, 16 Feb 2004 17:06:02 +0000 Subject: get alarms since the last notification, only use current time when there 2004-02-16 Rodrigo Moya * gui/alarm-notify/alarm-queue.c (query_objects_changed_cb): get alarms since the last notification, only use current time when there is no previous notification time. svn path=/trunk/; revision=24750 --- calendar/gui/alarm-notify/alarm-queue.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'calendar/gui/alarm-notify') diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index ddf9666ebb..bb41fbeeb9 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -511,7 +511,7 @@ static void query_objects_changed_cb (ECal *client, GList *objects, gpointer data) { ClientAlarms *ca; - time_t now, day_end; + time_t from, day_end; ECalComponentAlarms *alarms; gboolean found; icaltimezone *zone; @@ -520,17 +520,19 @@ query_objects_changed_cb (ECal *client, GList *objects, gpointer data) ca = data; - now = time (NULL); + from = config_data_get_last_notification_time (); + if (from == -1) + from = time (NULL); zone = config_data_get_timezone (); - day_end = time_day_end_with_zone (now, zone); + day_end = time_day_end_with_zone (from, zone); for (l = objects; l != NULL; l = l->next) { const char *uid; uid = icalcomponent_get_uid (l->data); - found = e_cal_get_alarms_for_object (ca->client, uid, now, day_end, &alarms); + found = e_cal_get_alarms_for_object (ca->client, uid, from, day_end, &alarms); if (!found) { remove_comp (ca, uid); -- cgit v1.2.3