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/ChangeLog | 14 ++++++++++++++ my-evolution/GNOME_Evolution_Summary.oaf.in | 13 +------------ my-evolution/component-factory.c | 16 +++++++--------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index 0877a244fe..7bbb00c4d8 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,17 @@ +2001-09-05 Ettore Perazzoli + + [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. + 2001-09-05 Iain Holmes * Locations: Added some Caracas fixes from Mayly Sanchez. diff --git a/my-evolution/GNOME_Evolution_Summary.oaf.in b/my-evolution/GNOME_Evolution_Summary.oaf.in index eeffbe28c0..4c4e42e2b8 100644 --- a/my-evolution/GNOME_Evolution_Summary.oaf.in +++ b/my-evolution/GNOME_Evolution_Summary.oaf.in @@ -1,19 +1,8 @@ - - - - - - - - - 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 v1.2.3