diff options
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/save.c | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index d26b6ddfba..4cb0b09a02 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,11 @@ 2003-12-22 Rodrigo Moya <rodrigo@ximian.com> + * gui/alarm-notify/save.c (get_saved_notification_time): if the setting + is not in the config database, use the current time, to avoid getting + hundreds of alarms for past events. + +2003-12-22 Rodrigo Moya <rodrigo@ximian.com> + * common/authentication.[ch]: new files for managing interactive authentication with backends. diff --git a/calendar/gui/alarm-notify/save.c b/calendar/gui/alarm-notify/save.c index d0b127fb99..5433cac806 100644 --- a/calendar/gui/alarm-notify/save.c +++ b/calendar/gui/alarm-notify/save.c @@ -78,14 +78,16 @@ time_t get_saved_notification_time (void) { GConfClient *conf_client; - long t; + GConfValue *value; if (!(conf_client = config_data_get_conf_client ())) return -1; - t = gconf_client_get_int (conf_client, KEY_LAST_NOTIFICATION_TIME, NULL); + value = gconf_client_get_without_default (conf_client, KEY_LAST_NOTIFICATION_TIME, NULL); + if (value) + return (time_t) gconf_value_get_int (value); - return (time_t) t; + return time (NULL); } /** |