aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-04-28 12:23:19 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-04-28 12:23:19 +0800
commit9483369aa04a5d2c4dc5c0034a3e4431153d9c99 (patch)
treeb52233be1d2618e4af4a919800422774133b4998 /calendar/cal-client
parent02ed4a60f394f53de32b10459c959ad6a1f7b887 (diff)
downloadgsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar
gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.gz
gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.bz2
gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.lz
gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.xz
gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.zst
gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.zip
Made Evolution OAF-compatible.
svn path=/trunk/; revision=2673
Diffstat (limited to 'calendar/cal-client')
-rw-r--r--calendar/cal-client/cal-client.c14
-rw-r--r--calendar/cal-client/client-test.c36
2 files changed, 42 insertions, 8 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");
diff --git a/calendar/cal-client/client-test.c b/calendar/cal-client/client-test.c
index fa8316707d..f4b847eb65 100644
--- a/calendar/cal-client/client-test.c
+++ b/calendar/cal-client/client-test.c
@@ -1,8 +1,7 @@
#include <config.h>
-#include <libgnorba/gnorba.h>
#include <bonobo.h>
+#include <gnome.h>
#include <cal-client/cal-client.h>
-
static CalClient *client1;
static CalClient *client2;
@@ -145,13 +144,25 @@ client_destroy_cb (GtkObject *object, gpointer data)
gtk_main_quit ();
}
-int
-main (int argc, char **argv)
+#ifdef USING_OAF
+
+#include <liboaf/liboaf.h>
+
+static void
+init_corba (int *argc, char **argv)
{
- CORBA_Environment ev;
+ gnome_init ("tl-test", VERSION, *argc, argv);
+ oaf_init (*argc, argv);
+}
- bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- textdomain (PACKAGE);
+#else
+
+#include <libgnorba/gnorba.h>
+
+static void
+init_corba (int *argc, char **argv)
+{
+ CORBA_Environment ev;
CORBA_exception_init (&ev);
gnome_CORBA_init ("tl-test", VERSION, &argc, argv, 0, &ev);
@@ -161,6 +172,17 @@ main (int argc, char **argv)
exit (1);
}
CORBA_exception_free (&ev);
+}
+
+#endif
+
+int
+main (int argc, char **argv)
+{
+ bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ textdomain (PACKAGE);
+
+ init_corba (&argc, argv);
if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) {
g_message ("main(): could not initialize Bonobo");