aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-10-30 08:53:36 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-10-30 08:53:36 +0800
commitad97ddd68a45ec03a36b25d99ff957a472a1e588 (patch)
tree6125e60e4fd0bbe7bd179f2b05da0e7a40c4b893
parent55d0f4b62c24985dc29e0af0b66c7031f738284c (diff)
downloadgsoc2013-evolution-ad97ddd68a45ec03a36b25d99ff957a472a1e588.tar
gsoc2013-evolution-ad97ddd68a45ec03a36b25d99ff957a472a1e588.tar.gz
gsoc2013-evolution-ad97ddd68a45ec03a36b25d99ff957a472a1e588.tar.bz2
gsoc2013-evolution-ad97ddd68a45ec03a36b25d99ff957a472a1e588.tar.lz
gsoc2013-evolution-ad97ddd68a45ec03a36b25d99ff957a472a1e588.tar.xz
gsoc2013-evolution-ad97ddd68a45ec03a36b25d99ff957a472a1e588.tar.zst
gsoc2013-evolution-ad97ddd68a45ec03a36b25d99ff957a472a1e588.zip
Launch the alarm daemon as soon as the calendar component is started.
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. svn path=/trunk/; revision=14389
-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 ();