aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client/cal-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/cal-client/cal-client.c')
-rw-r--r--calendar/cal-client/cal-client.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index 34192387b4..bffa12ac65 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -22,7 +22,13 @@
#include <config.h>
#include <gtk/gtksignal.h>
+
+#ifdef USING_OAF
+#include <liboaf/liboaf.h>
+#else
#include <libgnorba/gnorba.h>
+#endif
+
#include "cal-client.h"
#include "cal-listener.h"
@@ -375,18 +381,24 @@ cal_client_construct (CalClient *client)
CORBA_Environment ev;
int result;
+ CORBA_exception_init (&ev);
g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (IS_CAL_CLIENT (client), NULL);
priv = client->priv;
+#ifdef USING_OAF
+ factory = (Evolution_Calendar_CalFactory) oaf_activate_from_id (
+ "OAFIID:evolution:calendar-factory:1c915858-ece3-4a6f-9d81-ea0f108a9554",
+ OAF_FLAG_NO_LOCAL, NULL, &ev);
+#else
factory = (Evolution_Calendar_CalFactory) goad_server_activate_with_id (
NULL,
"evolution:calendar-factory",
GOAD_ACTIVATE_REMOTE,
NULL);
+#endif
- CORBA_exception_init (&ev);
result = CORBA_Object_is_nil (factory, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_message ("cal_client_construct(): could not see if the factory is NIL");