From 9483369aa04a5d2c4dc5c0034a3e4431153d9c99 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 28 Apr 2000 04:23:19 +0000 Subject: Made Evolution OAF-compatible. svn path=/trunk/; revision=2673 --- calendar/gui/evolution-calendar-control.c | 33 +++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'calendar/gui/evolution-calendar-control.c') diff --git a/calendar/gui/evolution-calendar-control.c b/calendar/gui/evolution-calendar-control.c index c8c419d471..54ac148889 100644 --- a/calendar/gui/evolution-calendar-control.c +++ b/calendar/gui/evolution-calendar-control.c @@ -2,10 +2,14 @@ #include #include -#include #include #include +#ifdef USING_OAF +#include +#else +#include +#endif #include #include @@ -17,6 +21,11 @@ #define PROPERTY_CALENDAR_URI_IDX 1 +#ifdef USING_OAF +#define CONTROL_FACTORY_ID "OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc" +#else +#define CONTROL_FACTORY_ID "control-factory:calendar" +#endif CORBA_Environment ev; CORBA_ORB orb; @@ -36,15 +45,21 @@ control_activate_cb (BonoboControl *control, static void -init_bonobo (int argc, char **argv) +init_bonobo (int *argc, char **argv) { +#ifdef USING_OAF + /* FIXME: VERSION instead of "0.0". */ + gnome_init_with_popt_table ("evolution-calendar", "0.0", + *argc, argv, oaf_popt_options, + 0, NULL); + oaf_init (*argc, argv); +#else gnome_CORBA_init_with_popt_table ( "evolution-calendar", "0.0", - &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); + argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); +#endif - orb = gnome_CORBA_ORB (); - - if (bonobo_init (orb, NULL, NULL) == FALSE) + if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) g_error (_("Could not initialize Bonobo")); } @@ -144,8 +159,10 @@ calendar_factory_init (void) if (calendar_control_factory != NULL) return; + puts ("XXXXXX - initializing calendar factory!!!"); + calendar_control_factory = - bonobo_generic_factory_new ("control-factory:calendar", + bonobo_generic_factory_new (CONTROL_FACTORY_ID, calendar_factory, NULL); if (calendar_control_factory == NULL) { @@ -164,7 +181,7 @@ main (int argc, char **argv) CORBA_exception_init (&ev); - init_bonobo (argc, argv); + init_bonobo (&argc, argv); calendar_factory_init (); -- cgit v1.2.3