[Fix #958, ShellComponents should not be created by factories, for
the mailer case.] * GNOME_Evolution_Mail.oaf.in: Remove the GNOME_Evolution_Mail_ShellComponentFactory. * component-factory.c: Changed to not use a factory. (COMPONENT_FACTORY_ID): Removed. (COMPONENT_ID): New. (idle_quit): Don't unref the component_factory. (create_component): Renamed from `component_fn'. Take no args. (component_factory_init): Create the component with `create_component' and register it on OAF. svn path=/trunk/; revision=12637
This commit is contained in:
@ -1,3 +1,19 @@
|
||||
2001-09-05 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
[Fix #958, ShellComponents should not be created by factories, for
|
||||
the mailer case.]
|
||||
|
||||
* GNOME_Evolution_Mail.oaf.in: Remove the
|
||||
GNOME_Evolution_Mail_ShellComponentFactory.
|
||||
|
||||
* component-factory.c: Changed to not use a factory.
|
||||
(COMPONENT_FACTORY_ID): Removed.
|
||||
(COMPONENT_ID): New.
|
||||
(idle_quit): Don't unref the component_factory.
|
||||
(create_component): Renamed from `component_fn'. Take no args.
|
||||
(component_factory_init): Create the component with
|
||||
`create_component' and register it on OAF.
|
||||
|
||||
2001-09-06 Radek Doulik <rodo@ximian.com>
|
||||
|
||||
* everywhere updated for new mail_content_loaded definition
|
||||
|
||||
@ -25,23 +25,10 @@
|
||||
_value="Evolution mail folder display component."/>
|
||||
</oaf_server>
|
||||
|
||||
<oaf_server iid="OAFIID:GNOME_Evolution_Mail_ShellComponentFactory"
|
||||
<oaf_server iid="OAFIID:GNOME_Evolution_Mail_ShellComponent"
|
||||
type="exe"
|
||||
location="evolution-mail">
|
||||
|
||||
<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 mail component."/>
|
||||
|
||||
</oaf_server>
|
||||
|
||||
<oaf_server iid="OAFIID:GNOME_Evolution_Mail_ShellComponent"
|
||||
type="factory"
|
||||
location="OAFIID:GNOME_Evolution_Mail_ShellComponentFactory">
|
||||
|
||||
<oaf_attribute name="repo_ids" type="stringv">
|
||||
<item value="IDL:GNOME/Evolution/ShellComponent:1.0"/>
|
||||
</oaf_attribute>
|
||||
|
||||
@ -63,10 +63,9 @@ char *evolution_dir;
|
||||
|
||||
EvolutionShellClient *global_shell_client = NULL;
|
||||
|
||||
#define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ShellComponentFactory"
|
||||
#define SUMMARY_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponentFactory"
|
||||
#define COMPONENT_ID "OAFIID:GNOME_Evolution_Mail_ShellComponent"
|
||||
#define SUMMARY_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponentFactory"
|
||||
|
||||
static BonoboGenericFactory *component_factory = NULL;
|
||||
static GHashTable *storages_hash;
|
||||
static EvolutionShellComponent *shell_component;
|
||||
|
||||
@ -677,7 +676,6 @@ idle_quit (gpointer user_data)
|
||||
if (e_list_length (folder_browser_factory_get_control_list ()))
|
||||
return TRUE;
|
||||
|
||||
bonobo_object_unref (BONOBO_OBJECT (component_factory));
|
||||
g_hash_table_foreach (storages_hash, free_storage, NULL);
|
||||
g_hash_table_destroy (storages_hash);
|
||||
|
||||
@ -742,7 +740,7 @@ user_create_new_item_cb (EvolutionShellComponent *shell_component,
|
||||
}
|
||||
|
||||
static BonoboObject *
|
||||
component_fn (BonoboGenericFactory *factory, void *closure)
|
||||
create_component (void)
|
||||
{
|
||||
EvolutionShellComponentDndDestinationFolder *destination_interface;
|
||||
MailOfflineHandler *offline_handler;
|
||||
@ -790,17 +788,21 @@ component_fn (BonoboGenericFactory *factory, void *closure)
|
||||
void
|
||||
component_factory_init (void)
|
||||
{
|
||||
component_factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID,
|
||||
component_fn, NULL);
|
||||
BonoboObject *shell_component;
|
||||
int result;
|
||||
|
||||
evolution_mail_config_factory_init ();
|
||||
evolution_folder_info_factory_init ();
|
||||
|
||||
if (component_factory == NULL) {
|
||||
shell_component = create_component ();
|
||||
result = oaf_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (shell_component));
|
||||
if (result == OAF_REG_ERROR) {
|
||||
e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
|
||||
_("Cannot initialize Evolution's mail component."));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/* FIXME these don't check for errors. */
|
||||
|
||||
evolution_mail_config_factory_init ();
|
||||
evolution_folder_info_factory_init ();
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user