diff options
author | Federico Mena Quintero <federico@ximian.com> | 2001-09-18 04:04:42 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2001-09-18 04:04:42 +0800 |
commit | a6d5818f66df9ecf6c96c700fdf32a514c134ce3 (patch) | |
tree | 357eb0a4a492c6cc5c45536632887e06212b55f1 /calendar/gui/alarm-notify/notify-main.c | |
parent | 9772d692a2b717b7978008d2426aec71aa3fe33f (diff) | |
download | gsoc2013-evolution-a6d5818f66df9ecf6c96c700fdf32a514c134ce3.tar gsoc2013-evolution-a6d5818f66df9ecf6c96c700fdf32a514c134ce3.tar.gz gsoc2013-evolution-a6d5818f66df9ecf6c96c700fdf32a514c134ce3.tar.bz2 gsoc2013-evolution-a6d5818f66df9ecf6c96c700fdf32a514c134ce3.tar.lz gsoc2013-evolution-a6d5818f66df9ecf6c96c700fdf32a514c134ce3.tar.xz gsoc2013-evolution-a6d5818f66df9ecf6c96c700fdf32a514c134ce3.tar.zst gsoc2013-evolution-a6d5818f66df9ecf6c96c700fdf32a514c134ce3.zip |
Switch the alarm system from using SIGALRM to normal glib timers. Also,
2001-09-17 Federico Mena Quintero <federico@ximian.com>
Switch the alarm system from using SIGALRM to normal glib timers.
Also, use a more robust de-queueing mechanism.
* gui/alarm-notify/alarm.c (alarm_init): Removed.
(alarm_done): Remove the glib timeout instead of closing the pipes
and the signal handler.
(alarm_add): Allow adding alarms that happen before right now.
(queue_alarm): Use a glib timer instead of a signal.
(alarm_remove): Adjust the timeout as appropriate.
* gui/alarm-notify/notify-main.c (main): There is no need to
initialize the alarm system now.
* gui/main.c (main): Likewise.
svn path=/trunk/; revision=12904
Diffstat (limited to 'calendar/gui/alarm-notify/notify-main.c')
-rw-r--r-- | calendar/gui/alarm-notify/notify-main.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index db0cd4e719..5134aae0b7 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -44,30 +44,6 @@ static BonoboGenericFactory *factory; static AlarmNotify *alarm_notify_service; -/* La de da */ -static void -funny_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data) -{ - char *msg; - char str[256]; - struct tm *tm; - - tm = localtime (&trigger); - strftime (str, sizeof (str), "%Y/%m/%d %H:%M:%S", tm); - - msg = g_strdup_printf (_("It is %s. The Unix time is %ld right now. We just thought " - "you may like to know."), str, (long) trigger); - gnome_ok_dialog (msg); - g_free (msg); -} - -/* Dum de dum */ -static void -funny_times_init (void) -{ - alarm_add ((time_t) 999999999L, funny_trigger_cb, NULL, NULL); /* Sep 9 01:46:39 2001 UTC */ -} - /* Factory function for the alarm notify service; just creates and references a * singleton service object. */ @@ -106,11 +82,8 @@ main (int argc, char **argv) glade_gnome_init (); - alarm_init (); alarm_queue_init (); - funny_times_init (); - factory = bonobo_generic_factory_new ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify_Factory", alarm_notify_factory_fn, NULL); if (!factory) |