diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2004-02-17 01:06:02 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-02-17 01:06:02 +0800 |
commit | 16a88711a5d28bc19fa0fac6b5b7211bd8d99461 (patch) | |
tree | 05b2ec777ea6b35f4bd21cec71d7f47459316ad6 /calendar | |
parent | 8fdf1ccc1d65dffdfd930ab64641f897f7d4578a (diff) | |
download | gsoc2013-evolution-16a88711a5d28bc19fa0fac6b5b7211bd8d99461.tar.gz gsoc2013-evolution-16a88711a5d28bc19fa0fac6b5b7211bd8d99461.tar.zst gsoc2013-evolution-16a88711a5d28bc19fa0fac6b5b7211bd8d99461.zip |
get alarms since the last notification, only use current time when there
2004-02-16 Rodrigo Moya <rodrigo@ximian.com>
* 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
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 4 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm-queue.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 09e98653e7..6e74427136 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,9 @@ 2004-02-16 Rodrigo Moya <rodrigo@ximian.com> + * 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. + * gui/alarm-notify/notify-main.c (init_session): set session restart style to RESTART_IF_RUNNING. 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); |