From 43d9fc01998aa0ad32366b7f56f2708c18e81ca9 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Wed, 5 Sep 2001 23:47:46 +0000 Subject: [Fix #958, ShellComponents should not be created by factories, for the Summary.] * component-factory.c (COMPONENT_FACTORY_IID): Removed. (COMPONENT_ID): New. (create_component): Renamed from `factory_fn'. No args. (component_factory_init): Create the BonoboObject with `create_component' and register it on OAF. * GNOME_Evolution_Summary.oaf.in: Remove the ShellComponentFactory. svn path=/trunk/; revision=12646 --- my-evolution/component-factory.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'my-evolution/component-factory.c') diff --git a/my-evolution/component-factory.c b/my-evolution/component-factory.c index bcb1f69df4..1287ff0ea0 100644 --- a/my-evolution/component-factory.c +++ b/my-evolution/component-factory.c @@ -22,7 +22,7 @@ #include "component-factory.h" #include -#define COMPONENT_FACTORY_IID "OAFIID:GNOME_Evolution_Summary_ShellComponentFactory" +#define COMPONENT_ID "OAFIID:GNOME_Evolution_Summary_ShellComponent" static gint running_objects = 0; @@ -99,8 +99,7 @@ component_destroy (BonoboObject *factory, } static BonoboObject * -factory_fn (BonoboGenericFactory *factory, - void *closure) +create_component (void) { EvolutionShellComponent *shell_component; ESummaryOfflineHandler *offline_handler; @@ -131,16 +130,15 @@ factory_fn (BonoboGenericFactory *factory, void component_factory_init (void) { - BonoboGenericFactory *object; + BonoboObject *object; + int result; - object = bonobo_generic_factory_new (COMPONENT_FACTORY_IID, - factory_fn, NULL); + object = create_component (); - if (object == NULL) { + result = oaf_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (object)); + if (result == OAF_REG_ERROR) { e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Cannot initialize Evolution's Executive Summary component.")); exit (1); } - - bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (object)); } -- cgit