aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
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
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')
-rw-r--r--my-evolution/ChangeLog14
-rw-r--r--my-evolution/GNOME_Evolution_Summary.oaf.in13
-rw-r--r--my-evolution/component-factory.c16
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 <ettore@ximian.com>
+
+ [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 <iain@ximian.com>
* 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 @@
<oaf_info>
-<oaf_server iid="OAFIID:GNOME_Evolution_Summary_ShellComponentFactory"
+<oaf_server iid="OAFIID:GNOME_Evolution_Summary_ShellComponent"
type="exe"
location="evolution-executive-summary">
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Evolution executive summary component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Summary_ShellComponent"
- type="factory"
- location="OAFIID:GNOME_Evolution_Summary_ShellComponentFactory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/Evolution/ShellComponent:1.0"/>
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));
}