Re: [evolution-patches] [calendar-alarm] fix for #261625
- From: "Chakravarthi P" <pchakravarthi novell com>
- To: "P Chenthill" <PChenthill novell com>
- Cc: evolution-patches gnome org
- Subject: Re: [evolution-patches] [calendar-alarm] fix for #261625
- Date: Sat, 10 Sep 2005 02:37:00 -0600
resending the patch with proper indentations.
regards.
On Fri, 2005-09-09 at 22:37 +0000, "P Chenthill" wrote:
> On Thu, 2005-09-08 at 09:29 +0000, "Chakravarthi P" wrote:
> > + if (ar->trigger > time (NULL)) {
> > alarms = g_list_insert_sorted (alarms, ar,
> > compare_alarm_by_time);
> >
> Looks good. Please correct the indentations.
>
> thanks, Chenthill.
>
> _______________________________________________
> Evolution-patches mailing list
> Evolution-patches gnome org
> http://mail.gnome.org/mailman/listinfo/evolution-patches
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2802
diff -u -p -t -r1.2802 ChangeLog
--- ChangeLog 25 Aug 2005 10:26:27 -0000 1.2802
+++ ChangeLog 10 Sep 2005 08:34:04 -0000
@@ -1,3 +1,10 @@
+2005-09-08 P. S. Chakravarthi <pchakravarthi novell com>
+
+ Fix #261625
+ * gui/alarm-notify/alarm.c
+ (queue_alarm): add the alarm in the queue only when the
+ the alarm trigger time is after the current time.
+
2005-08-24 Chenthill Palanisamy <pchenthill novell com>
Fixes #313705
Index: gui/alarm-notify/alarm.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm.c,v
retrieving revision 1.32
diff -u -p -t -r1.32 alarm.c
--- gui/alarm-notify/alarm.c 6 Aug 2004 09:48:52 -0000 1.32
+++ gui/alarm-notify/alarm.c 10 Sep 2005 08:34:04 -0000
@@ -132,10 +132,10 @@ setup_timeout (void)
}
/* Ensure that if the trigger managed to get behind the
- * current time we timeout immediately */
+ * current time we timeout immediately */
diff = MAX (0, ar->trigger - time (NULL));
now = time (NULL);
-
+
/* Add the time out */
g_message ("Setting timeout for %d %lu %lu", diff, ar->trigger, now);
g_message (" %s", ctime (&ar->trigger));
@@ -164,15 +164,18 @@ 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 */
- 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;
-
- /* Set the timer for removal upon activation */
- setup_timeout ();
+ /* 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);
+
+ /* 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 ();
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]