aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/main.c31
2 files changed, 37 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 41a3247647..3672346b8f 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,11 @@
2001-10-29 Federico Mena Quintero <federico@ximian.com>
+ * gui/main.c (launch_alarm_daemon): Launch the alarm daemon as
+ soon as the calendar component is started. Fixes bug #13867;
+ we can't really do much better than this.
+
+2001-10-29 Federico Mena Quintero <federico@ximian.com>
+
* gui/tasks-control.c (pixmaps): Fix the verb names for the
pixmaps in the Edit menu; they were out of synch with the XML
UI description.
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index e49aa3272b..768d6fddcc 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -91,6 +91,35 @@ component_editor_factory_init (void)
g_error (_("Could not create the component editor factory"));
}
+/* Does a simple activation and unreffing of the alarm notification service so
+ * that the daemon will be launched if it is not running yet.
+ */
+static void
+launch_alarm_daemon (void)
+{
+ CORBA_Environment ev;
+ GNOME_Evolution_Calendar_AlarmNotify an;
+
+ CORBA_exception_init (&ev);
+ an = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev);
+
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_message ("add_alarms(): Could not activate the alarm notification service");
+ CORBA_exception_free (&ev);
+ return;
+ }
+ CORBA_exception_free (&ev);
+
+ /* Just get rid of it; what we are interested in is that it gets launched */
+
+ CORBA_exception_init (&ev);
+ bonobo_object_release_unref (an, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION)
+ g_message ("add_alarms(): Could not unref the alarm notification service");
+
+ CORBA_exception_free (&ev);
+}
+
int
main (int argc, char **argv)
{
@@ -122,6 +151,8 @@ main (int argc, char **argv)
tasks_control_factory_init ();
component_editor_factory_init ();
+ launch_alarm_daemon ();
+
bonobo_main ();
alarm_done ();