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 --- shell/main.c | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to 'shell/main.c') diff --git a/shell/main.c b/shell/main.c index d03c925b44..9fa59a6ee0 100644 --- a/shell/main.c +++ b/shell/main.c @@ -5,15 +5,23 @@ * Miguel de Icaza (miguel@helixcode.com) * */ + #include + #include -#include #include #include #include #include /* for e_setup_base_dir */ #include #include + +#ifdef USING_OAF +#include +#else +#include +#endif + #include "e-shell.h" #include "e-shell-view.h" @@ -29,6 +37,21 @@ const struct poptOption shell_popt_options [] = { { NULL, '\0', 0, NULL, 0 } }; +#ifdef USING_OAF + +static void +corba_init (int *argc, char *argv []) +{ + gnomelib_register_popt_table (shell_popt_options, "Evolution shell options"); + + gnome_init_with_popt_table ("Evolution", VERSION, *argc, argv, + oaf_popt_options, 0, NULL); + + oaf_init (*argc, argv); +} + +#else /* USING_OAF */ + static void corba_init (int *argc, char *argv []) { @@ -39,8 +62,14 @@ corba_init (int *argc, char *argv []) "Evolution", VERSION, argc, argv, shell_popt_options, 0, &ctx, GNORBA_INIT_SERVER_FUNC, &ev); CORBA_exception_free (&ev); - - if (bonobo_init (gnome_CORBA_ORB (), NULL, NULL) == FALSE){ +} + +#endif /* USING_OAF */ + +static void +init_bonobo (void) +{ + if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE){ e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Failed to initialize the Bonobo component system")); exit (1); @@ -96,6 +125,8 @@ main (int argc, char *argv []) textdomain (PACKAGE); corba_init (&argc, argv); + init_bonobo (); + gui_init (); evolution_boot (); -- cgit v1.2.3