[evolution-patches] [calendar-alarms] fix 319217
- From: "Chakravarthi P" <pchakravarthi novell com>
- To: <evolution-patches gnome org>
- Subject: [evolution-patches] [calendar-alarms] fix 319217
- Date: Thu, 20 Oct 2005 03:17:32 -0600
hi
this patch here makes sure that
none of the current day's alarms
till current time go unnoticed.
and so fixes 319217.
modified the "from" parameter in
load_alarms_for_today and removed
a check in setup_timeout()
regards
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2831
diff -u -p -t -r1.2831 ChangeLog
--- ChangeLog 19 Oct 2005 11:38:14 -0000 1.2831
+++ ChangeLog 20 Oct 2005 08:31:29 -0000
@@ -1,3 +1,14 @@
+2005-10-20 P S Chakravarthi
+
+ 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-19 Harish Krishnaswamy <kharish novell com>
Committing for Nathan Owens <pianocomp81 yahoo com>
Index: gui/alarm-notify/alarm.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm.c,v
retrieving revision 1.33
diff -u -p -t -r1.33 alarm.c
--- gui/alarm-notify/alarm.c 19 Sep 2005 08:10:53 -0000 1.33
+++ gui/alarm-notify/alarm.c 20 Oct 2005 08:31:29 -0000
@@ -165,21 +165,17 @@ queue_alarm (AlarmRecord *ar)
/* Track the current head of the list in case there are changes */
old_head = alarms;
- /* 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);
+ /* Insert the new alarm in the list according to its trigger 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 ();
}
-
/**
* alarm_add:
Index: gui/alarm-notify/alarm-queue.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm-queue.c,v
retrieving revision 1.89
diff -u -p -t -r1.89 alarm-queue.c
--- gui/alarm-notify/alarm-queue.c 11 Oct 2005 09:07:24 -0000 1.89
+++ gui/alarm-notify/alarm-queue.c 20 Oct 2005 08:31:30 -0000
@@ -449,18 +449,19 @@ load_alarms (ClientAlarms *ca, time_t st
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]