aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-09-23 17:59:35 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-09-23 17:59:35 +0800
commitd2353512a5f544d9eee94388e2f4090aed7b1ab0 (patch)
tree182e5437210f59e4cc2da94e57c02d08f0d02b7f /calendar/gui
parent90c8115f2fcd274d3eb7d5f70a291000553ede94 (diff)
downloadgsoc2013-evolution-d2353512a5f544d9eee94388e2f4090aed7b1ab0.tar
gsoc2013-evolution-d2353512a5f544d9eee94388e2f4090aed7b1ab0.tar.gz
gsoc2013-evolution-d2353512a5f544d9eee94388e2f4090aed7b1ab0.tar.bz2
gsoc2013-evolution-d2353512a5f544d9eee94388e2f4090aed7b1ab0.tar.lz
gsoc2013-evolution-d2353512a5f544d9eee94388e2f4090aed7b1ab0.tar.xz
gsoc2013-evolution-d2353512a5f544d9eee94388e2f4090aed7b1ab0.tar.zst
gsoc2013-evolution-d2353512a5f544d9eee94388e2f4090aed7b1ab0.zip
only save the new notification time if it is bigger than the already saved
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. svn path=/trunk/; revision=18162
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/alarm-notify/save.c8
1 files changed, 7 insertions, 1 deletions
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);
}
/**