diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-11-08 16:47:49 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-11-08 16:47:49 +0800 |
commit | 35b59bde31bebcf1a823a8b3e5262e73e719237a (patch) | |
tree | 34fddbec57373687cab6b83dba0b578e34c0a906 /calendar | |
parent | e3b6a2229da0aedf826cbf474a4cb0c657269d3a (diff) | |
download | gsoc2013-evolution-35b59bde31bebcf1a823a8b3e5262e73e719237a.tar gsoc2013-evolution-35b59bde31bebcf1a823a8b3e5262e73e719237a.tar.gz gsoc2013-evolution-35b59bde31bebcf1a823a8b3e5262e73e719237a.tar.bz2 gsoc2013-evolution-35b59bde31bebcf1a823a8b3e5262e73e719237a.tar.lz gsoc2013-evolution-35b59bde31bebcf1a823a8b3e5262e73e719237a.tar.xz gsoc2013-evolution-35b59bde31bebcf1a823a8b3e5262e73e719237a.tar.zst gsoc2013-evolution-35b59bde31bebcf1a823a8b3e5262e73e719237a.zip |
Changed the code to load alarms from current day beginning if the last notification
time is beyond current day's beginning time in the function load_alarms_for_today()
and removed a check in the function setup_timeout()
svn path=/trunk/; revision=30578
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 11 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm-queue.c | 7 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm.c | 14 |
3 files changed, 21 insertions, 11 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index a5e5b3289b..b9b457a4f6 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,14 @@ +2005-11-08 P. S. Chakravarthi <pchakravarthi@novell.com> + + Fixes 319217 + * gui/alarm-notify/alarm-queue.c (load_alarms_for_today): + changed the code to load alarms from current day beginning if + last notification time is beyond current day's begin time and + * gui/alarm-notify/alarm.c (setup_timeout): + removed the check which sees if the alarm's trigger time has + got past current time so that alarms missed in current day are + always shown. + 2005-10-21 Mubeen Jukaku <jmubeen@novell.com> Sankar Committting for Mubeen diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index f8df860487..40a43b674a 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -449,18 +449,19 @@ load_alarms (ClientAlarms *ca, time_t start, time_t end) static void load_alarms_for_today (ClientAlarms *ca) { - time_t now, from, day_end; + time_t now, from, day_end, day_start; icaltimezone *zone; now = time (NULL); + zone = config_data_get_timezone (); + day_start = time_day_begin_with_zone (now, zone); /* Make sure we don't miss some events from the last notification. * We add 1 to the saved_notification_time to make the time ranges * half-open; we do not want to display the "last" displayed alarm * twice, once when it occurs and once when the alarm daemon restarts. */ - from = MIN (config_data_get_last_notification_time () + 1, now); - zone = config_data_get_timezone (); + from = MAX (config_data_get_last_notification_time () + 1, day_start); g_message ("Loading alarms for today"); day_end = time_day_end_with_zone (now, zone); diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c index 3d371d9f9b..d29ad3133a 100644 --- a/calendar/gui/alarm-notify/alarm.c +++ b/calendar/gui/alarm-notify/alarm.c @@ -167,16 +167,14 @@ queue_alarm (AlarmRecord *ar) /* Insert the new alarm in order if the alarm's trigger time is after the current time */ - if (ar->trigger > time (NULL)) { - alarms = g_list_insert_sorted (alarms, ar, compare_alarm_by_time); + alarms = g_list_insert_sorted (alarms, ar, compare_alarm_by_time); - /* If there first item on the list didn't change, the time out is fine */ - if (old_head == alarms) - return; + /* If there first item on the list didn't change, the time out is fine */ + if (old_head == alarms) + return; - /* Set the timer for removal upon activation */ - setup_timeout (); - } + /* Set the timer for removal upon activation */ + setup_timeout (); } |