diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-12-05 03:52:45 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-12-05 03:52:45 +0800 |
commit | e53eacd2d9b6b775dab6e8bd8cd39f0691192437 (patch) | |
tree | f7bbd92c815ecd7fdbe85ec97d1c693b1c4b8fd0 /my-evolution/component-factory.c | |
parent | 51a6fc1a8f6369014d91801ffb88aa2fa6f65cd4 (diff) | |
download | gsoc2013-evolution-e53eacd2d9b6b775dab6e8bd8cd39f0691192437.tar.gz gsoc2013-evolution-e53eacd2d9b6b775dab6e8bd8cd39f0691192437.tar.zst gsoc2013-evolution-e53eacd2d9b6b775dab6e8bd8cd39f0691192437.zip |
Updated to be a shared library.
* GNOME_Evolution_Summary.server.in.in: Updated to be a shared
library.
* main.c: Removed.
* Makefile.am: Update to compile as a shared library.
* component-factory.c: Changed to be a shared library factory, for
both the ShellComponent and the ConfigControl objects.
* e-summary-preferences.c
(e_summary_preferences_init_config_control): Renamed from
e_summary_preferences_register_config_control_factory.
(e_summary_preferences_create_control): Renamed from factory_fn
and removed all args.
svn path=/trunk/; revision=19007
Diffstat (limited to 'my-evolution/component-factory.c')
-rw-r--r-- | my-evolution/component-factory.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/my-evolution/component-factory.c b/my-evolution/component-factory.c index eaa84e39f8..6cfa41d7ba 100644 --- a/my-evolution/component-factory.c +++ b/my-evolution/component-factory.c @@ -42,7 +42,10 @@ #include "component-factory.h" -#define COMPONENT_ID "OAFIID:GNOME_Evolution_Summary_ShellComponent" +#define FACTORY_ID "OAFIID:GNOME_Evolution_Summary_ComponentFactory" + +#define COMPONENT_ID "OAFIID:GNOME_Evolution_Summary_ShellComponent" +#define PREFERENCES_CONTROL_ID "OAFIID:GNOME_Evolution_Summary_ConfigControl" static gint running_objects = 0; static ESummaryPrefs *global_preferences = NULL; @@ -101,7 +104,7 @@ owner_set_cb (EvolutionShellComponent *shell_component, corba_shell = evolution_shell_client_corba_objref (shell_client); e_summary_folder_init_folder_store (corba_shell); - e_summary_preferences_register_config_control_factory (corba_shell); + e_summary_preferences_init_control (corba_shell); } static void @@ -112,7 +115,7 @@ owner_unset_cb (EvolutionShellComponent *shell_component, } static BonoboObject * -create_component (void) +create_shell_component (void) { EvolutionShellComponent *shell_component; ESummaryOfflineHandler *offline_handler; @@ -141,23 +144,20 @@ create_component (void) return BONOBO_OBJECT (shell_component); } -/* Factory for the out-of-proc case. */ -void -component_factory_init (void) +static BonoboObject * +factory (BonoboGenericFactory *this, + const char *object_id, + void *data) { - Bonobo_RegistrationResult result; - BonoboObject *shell_component; + if (strcmp (object_id, COMPONENT_ID) == 0) + return create_shell_component (); - shell_component = create_component (); + if (strcmp (object_id, PREFERENCES_CONTROL_ID) == 0) + return e_summary_preferences_create_control (); - result = bonobo_activation_active_server_register (COMPONENT_ID, - bonobo_object_corba_objref (BONOBO_OBJECT (shell_component))); + g_warning (FACTORY_ID ": Don't know anything about %s", object_id); - if (result != Bonobo_ACTIVATION_REG_SUCCESS) - g_error ("Cannot register Evolution Summary component factory."); + return NULL; } -#if 0 -/* Factory for the shlib case. */ -BONOBO_OAF_SHLIB_FACTORY (COMPONENT_FACTORY_ID, "Evolution Summary component", create_component, NULL) -#endif +BONOBO_ACTIVATION_SHLIB_FACTORY (FACTORY_ID, "Evolution Summary component", factory, NULL) |