diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-12-10 02:56:58 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-12-10 02:56:58 +0800 |
commit | 79178c27f26f7419c3e8f9ae2782ba3f3ab7de6b (patch) | |
tree | 6b43605aea3111150266a301706d28f7435b2478 /addressbook/gui | |
parent | 109dab31b42f752e32ac194e2a9cc370fdab138e (diff) | |
download | gsoc2013-evolution-79178c27f26f7419c3e8f9ae2782ba3f3ab7de6b.tar.gz gsoc2013-evolution-79178c27f26f7419c3e8f9ae2782ba3f3ab7de6b.tar.zst gsoc2013-evolution-79178c27f26f7419c3e8f9ae2782ba3f3ab7de6b.zip |
Forgot to commit this new file.
svn path=/trunk/; revision=19067
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/component/component-factory.c | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/addressbook/gui/component/component-factory.c b/addressbook/gui/component/component-factory.c new file mode 100644 index 0000000000..eed681c844 --- /dev/null +++ b/addressbook/gui/component/component-factory.c @@ -0,0 +1,67 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* component-factory.c - Factory for Evolution's Addressbook component. + * + * Copyright (C) 2002 Ximian, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Ettore Perazzoli <ettore@ximian.com> + */ + +#include <config.h> + +#include "addressbook.h" +#include "addressbook-component.h" +#include "addressbook-config.h" +#include "e-address-popup.h" +#include "e-address-widget.h" +#include "e-minicard-control.h" + +#include <bonobo/bonobo-shlib-factory.h> + + +#define FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_Factory" + +#define MINICARD_CONTROL_ID "OAFIID:GNOME_Evolution_Addressbook_MiniCard_Control" +#define ADDRESSBOOK_CONTROL_ID "OAFIID:GNOME_Evolution_Addressbook_Control" +#define SHELL_COMPONENT_ID "OAFIID:GNOME_Evolution_Addressbook_ShellComponent" +#define ADDRESS_WIDGET_ID "OAFIID:GNOME_Evolution_Addressbook_AddressWidget" +#define ADDRESS_POPUP_ID "OAFIID:GNOME_Evolution_Addressbook_AddressPopup" +#define LDAP_STORAGE_CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_LDAPStorage_ConfigControl" + + +static BonoboObject * +factory (BonoboGenericFactory *factory, + const char *component_id, + void *closure) +{ + if (strcmp (component_id, MINICARD_CONTROL_ID) == 0) + return BONOBO_OBJECT (e_minicard_control_new ()); + if (strcmp (component_id, ADDRESSBOOK_CONTROL_ID) == 0) + return BONOBO_OBJECT (addressbook_new_control ()); + if (strcmp (component_id, SHELL_COMPONENT_ID) == 0) + return addressbook_component_init (); + if (strcmp (component_id, ADDRESS_WIDGET_ID) == 0) + return BONOBO_OBJECT (e_address_widget_new_control ()); + if (strcmp (component_id, ADDRESS_POPUP_ID) == 0) + return BONOBO_OBJECT (e_address_popup_new_control ()); + if (strcmp (component_id, LDAP_STORAGE_CONFIG_CONTROL_ID) == 0) + return BONOBO_OBJECT (addressbook_config_control_new ()); + + g_warning (FACTORY_ID ": Don't know what to do with %s", component_id); + return NULL; +} + +BONOBO_ACTIVATION_SHLIB_FACTORY (FACTORY_ID, "Evolution Addressbook component factory", factory, NULL) |