aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog4
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c10
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);