From dbf077d9dd938f2aeccf6d907e5d87e106a92739 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 25 Jul 2000 01:16:38 +0000 Subject: Remove GOAD support. * e-shell.c, main.c: Remove GOAD support. * evolution-shell-component-client.c: Remove GOAD support. (evolution_shell_component_client_new): Give the "maybe OAF_INFO_PATH" message if no oafinfo file was found, and give a "consult previous error messages" message if the component was found but not activated. Abort in either case. svn path=/trunk/; revision=4299 --- shell/evolution-shell-component-client.c | 56 ++++++++------------------------ 1 file changed, 14 insertions(+), 42 deletions(-) (limited to 'shell/evolution-shell-component-client.c') diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c index 3a7ba57bbd..d805686518 100644 --- a/shell/evolution-shell-component-client.c +++ b/shell/evolution-shell-component-client.c @@ -31,6 +31,8 @@ #include #include +#include + #include "e-util/e-util.h" #include "evolution-shell-component-client.h" @@ -51,42 +53,6 @@ struct _EvolutionShellComponentClientPrivate { #define RETURN_ERROR_IF_FAIL(cond) \ g_return_val_if_fail ((cond), EVOLUTION_SHELL_COMPONENT_INVALIDARG) - -/* Object activation. */ - -#ifdef USING_OAF - -#include - -static CORBA_Object -activate_object_from_id (const char *id) -{ - CORBA_Environment ev; - CORBA_Object corba_object; - - CORBA_exception_init (&ev); - - corba_object = oaf_activate_from_id ((char *) id, 0, NULL, &ev); /* Yuck. */ - if (ev._major != CORBA_NO_EXCEPTION) - corba_object = CORBA_OBJECT_NIL; - - CORBA_exception_free (&ev); - - return corba_object; -} - -#else - -#include - -static CORBA_Object -activate_object_from_id (const char *id) -{ - return goad_server_activate_with_id (NULL, id, 0, NULL); -} - -#endif - /* Utility functions. */ @@ -350,21 +316,27 @@ EvolutionShellComponentClient * evolution_shell_component_client_new (const char *id) { EvolutionShellComponentClient *new; + CORBA_Environment ev; CORBA_Object corba_object; g_return_val_if_fail (id != NULL, NULL); - new = gtk_type_new (evolution_shell_component_client_get_type ()); + CORBA_exception_init (&ev); - corba_object = activate_object_from_id (id); + corba_object = oaf_activate_from_id ((char *) id, 0, NULL, &ev); /* Yuck. */ + if (ev._major != CORBA_NO_EXCEPTION) { + CORBA_exception_free (&ev); + g_error ("Could not start up component for %s. " + "(See previous error messages?)", id); + } + CORBA_exception_free (&ev); if (corba_object == CORBA_OBJECT_NIL) { - g_warning ("Could not activate component %s. " - "(Maybe you need to set OAF_INFO_PATH?)", id); - bonobo_object_unref (BONOBO_OBJECT (new)); - return NULL; + g_error ("Could not activate component %s. " + "(Maybe you need to set OAF_INFO_PATH?)", id); } + new = gtk_type_new (evolution_shell_component_client_get_type ()); evolution_shell_component_client_construct (new, corba_object); return new; -- cgit v1.2.3