diff options
author | Federico Mena Quintero <federico@ximian.com> | 2001-10-30 08:53:36 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2001-10-30 08:53:36 +0800 |
commit | ad97ddd68a45ec03a36b25d99ff957a472a1e588 (patch) | |
tree | 6125e60e4fd0bbe7bd179f2b05da0e7a40c4b893 /calendar/gui/main.c | |
parent | 55d0f4b62c24985dc29e0af0b66c7031f738284c (diff) | |
download | gsoc2013-evolution-ad97ddd68a45ec03a36b25d99ff957a472a1e588.tar.gz 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
Diffstat (limited to 'calendar/gui/main.c')
-rw-r--r-- | calendar/gui/main.c | 31 |
1 files changed, 31 insertions, 0 deletions
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 (); |