From e45e270823acb300fd0fc17e685aecb075f1a0b7 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Mon, 26 Feb 2001 20:21:53 +0000 Subject: Create a little stand-alone library for the low-level alarm trigger 2001-02-26 Federico Mena Quintero * gui/alarm-notify/Makefile.am (libalarm_a_SOURCES): Create a little stand-alone library for the low-level alarm trigger mechanism. This is so that the GUI parts of the calendar can use it in addition to the alarm daemon. * gui/main.c: #include "alarm-notify/alarm.h". * gui/calendar-summary.c: Likewise. (alarm_fn): Do not remove the previous alarm; it is removed automatically when it is triggered. * gui/Makefile.am (evolution_calendar_SOURCES): Removed alarm.[ch] from the sources. * gui/alarm.[ch]: Removed obsolete files. svn path=/trunk/; revision=8394 --- calendar/gui/calendar-summary.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'calendar/gui/calendar-summary.c') diff --git a/calendar/gui/calendar-summary.c b/calendar/gui/calendar-summary.c index 0d0c404769..163d56f524 100644 --- a/calendar/gui/calendar-summary.c +++ b/calendar/gui/calendar-summary.c @@ -39,11 +39,10 @@ #include #include -#include "cal-util/cal-component.h" -#include "cal-util/timeutil.h" -#include "alarm.h" +#include +#include +#include "alarm-notify/alarm.h" #include "calendar-model.h" - #include "calendar-summary.h" typedef struct { @@ -457,7 +456,7 @@ cal_opened_cb (CalClient *client, static void alarm_fn (gpointer alarm_id, - time_t old_t, + time_t trigger, gpointer data) { CalSummary *summary; @@ -465,9 +464,6 @@ alarm_fn (gpointer alarm_id, summary = data; - /* Remove the old alarm, and start a new one for the next midnight */ - alarm_remove (alarm_id); - t = time (NULL); day_end = time_day_end (t); summary->alarm = alarm_add (day_end, alarm_fn, summary, NULL); -- cgit v1.2.3