aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/component-factory.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-09-06 07:47:46 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-09-06 07:47:46 +0800
commit43d9fc01998aa0ad32366b7f56f2708c18e81ca9 (patch)
tree75607c324a17585e8a646039d9c63660bc1b2b21 /my-evolution/component-factory.c
parent0d760f9018672886d53c51010bb7c896687c24c1 (diff)
downloadgsoc2013-evolution-43d9fc01998aa0ad32366b7f56f2708c18e81ca9.tar
gsoc2013-evolution-43d9fc01998aa0ad32366b7f56f2708c18e81ca9.tar.gz
gsoc2013-evolution-43d9fc01998aa0ad32366b7f56f2708c18e81ca9.tar.bz2
gsoc2013-evolution-43d9fc01998aa0ad32366b7f56f2708c18e81ca9.tar.lz
gsoc2013-evolution-43d9fc01998aa0ad32366b7f56f2708c18e81ca9.tar.xz
gsoc2013-evolution-43d9fc01998aa0ad32366b7f56f2708c18e81ca9.tar.zst
gsoc2013-evolution-43d9fc01998aa0ad32366b7f56f2708c18e81ca9.zip
[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
Diffstat (limited to 'my-evolution/component-factory.c')
-rw-r--r--my-evolution/component-factory.c16
1 files changed, 7 insertions, 9 deletions
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 <gal/widgets/e-gui-utils.h>
-#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));
}