aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-09-23 23:00:30 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-09-23 23:00:30 +0800
commitb62d7e660eb743b06338441cb8a1827dd8d8102b (patch)
treebba3667444509138984e30f0c9757cc2ecd359e8 /calendar/gui
parent3420e4f430e8d164d3b6630020f380afc82783be (diff)
downloadgsoc2013-evolution-b62d7e660eb743b06338441cb8a1827dd8d8102b.tar
gsoc2013-evolution-b62d7e660eb743b06338441cb8a1827dd8d8102b.tar.gz
gsoc2013-evolution-b62d7e660eb743b06338441cb8a1827dd8d8102b.tar.bz2
gsoc2013-evolution-b62d7e660eb743b06338441cb8a1827dd8d8102b.tar.lz
gsoc2013-evolution-b62d7e660eb743b06338441cb8a1827dd8d8102b.tar.xz
gsoc2013-evolution-b62d7e660eb743b06338441cb8a1827dd8d8102b.tar.zst
gsoc2013-evolution-b62d7e660eb743b06338441cb8a1827dd8d8102b.zip
install an idle callback that will start the alarm daemon.
2002-09-23 Rodrigo Moya <rodrigo@ximian.com> * gui/main.c (launch_alarm_daemon): install an idle callback that will start the alarm daemon. (launch_alarm_daemon_cb): actually activate the alarm daemon here. svn path=/trunk/; revision=18168
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/main.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index 1f0eed02aa..5d9bdf30c5 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -102,19 +102,25 @@ component_editor_factory_init (void)
/* 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)
+static gboolean
+launch_alarm_daemon_cb (gpointer data)
{
CORBA_Environment ev;
GNOME_Evolution_Calendar_AlarmNotify an;
+ guint *idle_id = (guint *) data;
+
+ /* remove the idle function */
+ g_source_remove (*idle_id);
+ g_free (idle_id);
+ /* activate the alarm daemon */
CORBA_exception_init (&ev);
an = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev);
if (BONOBO_EX (&ev)) {
- g_message ("add_alarms(): Could not activate the alarm notification service");
+ g_message ("launch_alarm_daemon_cb(): Could not activate the alarm notification service");
CORBA_exception_free (&ev);
- return;
+ return FALSE;
}
CORBA_exception_free (&ev);
@@ -126,6 +132,17 @@ launch_alarm_daemon (void)
g_message ("add_alarms(): Could not unref the alarm notification service");
CORBA_exception_free (&ev);
+
+ return FALSE;
+}
+
+static void
+launch_alarm_daemon (void)
+{
+ guint *idle_id;
+
+ idle_id = g_new0 (guint, 1);
+ *idle_id = g_idle_add ((GSourceFunc) launch_alarm_daemon_cb, idle_id);
}
int