aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook-component.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-09-06 07:10:07 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-09-06 07:10:07 +0800
commitd6dd04933149ca13536cdaf2b32ca79387e93bdb (patch)
tree356e65b2b6c922a72a6667908b1d3fcdbc66a7bb /addressbook/gui/component/addressbook-component.c
parent56e5135e5ad332d906642c5bd923bf2fbd6d5296 (diff)
downloadgsoc2013-evolution-d6dd04933149ca13536cdaf2b32ca79387e93bdb.tar
gsoc2013-evolution-d6dd04933149ca13536cdaf2b32ca79387e93bdb.tar.gz
gsoc2013-evolution-d6dd04933149ca13536cdaf2b32ca79387e93bdb.tar.bz2
gsoc2013-evolution-d6dd04933149ca13536cdaf2b32ca79387e93bdb.tar.lz
gsoc2013-evolution-d6dd04933149ca13536cdaf2b32ca79387e93bdb.tar.xz
gsoc2013-evolution-d6dd04933149ca13536cdaf2b32ca79387e93bdb.tar.zst
gsoc2013-evolution-d6dd04933149ca13536cdaf2b32ca79387e93bdb.zip
[Fix #958, ShellComponents should not be created by factories, for
the addressbook.] * gui/component/addressbook-component.c (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_FACTORY_ID): Removed. (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID): New. (create_component): Renamed from `factory_fn'. Just register the thing on OAF. (addressbook_component_factory_init): Just call it. * gui/component/GNOME_Evolution_Addressbook.oaf.in: Remove the ShellComponentFactory. svn path=/trunk/; revision=12642
Diffstat (limited to 'addressbook/gui/component/addressbook-component.c')
-rw-r--r--addressbook/gui/component/addressbook-component.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index 17712134b3..961f706620 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -47,7 +47,7 @@
-#define GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_ShellComponentFactory"
+#define GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID "OAFIID:GNOME_Evolution_Addressbook_ShellComponent"
EvolutionShellClient *global_shell_client;
@@ -363,8 +363,7 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
/* The factory function. */
static BonoboObject *
-factory_fn (BonoboGenericFactory *factory,
- void *closure)
+create_component (void)
{
EvolutionShellComponent *shell_component;
EvolutionShellComponentDndDestinationFolder *destination_interface;
@@ -397,15 +396,19 @@ factory_fn (BonoboGenericFactory *factory,
}
+/* FIXME this should probably be renamed as we don't use factories anymore. */
void
addressbook_component_factory_init (void)
{
- if (factory != NULL)
- return;
+ BonoboObject *object;
+ int result;
- factory = bonobo_generic_factory_new (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_FACTORY_ID, factory_fn, NULL);
+ object = create_component ();
- if (factory == NULL)
- g_error ("Cannot initialize the Evolution addressbook factory.");
-}
+ /* FIXME: Handle errors better? */
+ result = oaf_active_server_register (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID,
+ bonobo_object_corba_objref (object));
+ if (result == OAF_REG_ERROR)
+ g_error ("Cannot register -- %s", GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID);
+}