aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-12-23 02:27:33 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-12-23 02:27:33 +0800
commita4f206c1399f3ed94c82e8846f328d3d9c81d37d (patch)
treeb040037c146630a56822c77c66b930a0c98604e7
parent1e0a5a8fa1c2e36347a7ecb361a3824b1690ac28 (diff)
downloadgsoc2013-evolution-a4f206c1399f3ed94c82e8846f328d3d9c81d37d.tar
gsoc2013-evolution-a4f206c1399f3ed94c82e8846f328d3d9c81d37d.tar.gz
gsoc2013-evolution-a4f206c1399f3ed94c82e8846f328d3d9c81d37d.tar.bz2
gsoc2013-evolution-a4f206c1399f3ed94c82e8846f328d3d9c81d37d.tar.lz
gsoc2013-evolution-a4f206c1399f3ed94c82e8846f328d3d9c81d37d.tar.xz
gsoc2013-evolution-a4f206c1399f3ed94c82e8846f328d3d9c81d37d.tar.zst
gsoc2013-evolution-a4f206c1399f3ed94c82e8846f328d3d9c81d37d.zip
if the setting is not in the config database, use the current time, to
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. svn path=/trunk/; revision=24003
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/alarm-notify/save.c8
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);
}
/**