diff options
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/save.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 6ffc860a84..08d445dfca 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2002-09-23 Rodrigo Moya <rodrigo@ximian.com> + + * gui/alarm-notify/save.c (save_notification_time): only save the + new notification time if it is bigger than the already saved one. + This should avoid some reminders showing up twice. + 2002-09-20 JP Rosevear <jpr@ximian.com> * gui/comp-util.c (cal_comp_is_on_server): check to see if the diff --git a/calendar/gui/alarm-notify/save.c b/calendar/gui/alarm-notify/save.c index 455af7f883..dc78686250 100644 --- a/calendar/gui/alarm-notify/save.c +++ b/calendar/gui/alarm-notify/save.c @@ -53,13 +53,19 @@ void save_notification_time (time_t t) { EConfigListener *cl; + time_t current_t; g_return_if_fail (t != -1); if (!(cl = config_data_get_listener ())) return; - e_config_listener_set_long (cl, KEY_LAST_NOTIFICATION_TIME, (long) t); + /* we only store the new notification time if it is bigger + than the already stored one */ + current_t = e_config_listener_get_long_with_default (cl, KEY_LAST_NOTIFICATION_TIME, + -1, NULL); + if (t > current_t) + e_config_listener_set_long (cl, KEY_LAST_NOTIFICATION_TIME, (long) t); } /** |