add proto

2001-05-11  JP Rosevear  <jpr@ximian.com>

	* mail-importer.h: add proto

	* mail-importer.c (mail_importer_uninit): release and unref the
	local storage

	* mail-local.c (mail_local_store_finalize): use
	bonobo_object_release_unref rather than doing Bonobo_Unknow_unref
	and a corba release
	(register_folder_registered): "sink" the local_store ref to
	prevent circular ref
	(mail_local_storage_shutdown): unref the local store

	* mail-local.h: new proto

	* component-factory.c (owner_unset_cb): uninit the importer and
	shutdown the local storage

svn path=/trunk/; revision=9768
This commit is contained in:
JP Rosevear
2001-05-11 19:57:15 +00:00
committed by JP Rosevear
parent 6febeab327
commit e3efaa319a
6 changed files with 39 additions and 4 deletions

View File

@ -1,3 +1,22 @@
2001-05-11 JP Rosevear <jpr@ximian.com>
* mail-importer.h: add proto
* mail-importer.c (mail_importer_uninit): release and unref the
local storage
* mail-local.c (mail_local_store_finalize): use
bonobo_object_release_unref rather than doing Bonobo_Unknow_unref
and a corba release
(register_folder_registered): "sink" the local_store ref to
prevent circular ref
(mail_local_storage_shutdown): unref the local store
* mail-local.h: new proto
* component-factory.c (owner_unset_cb): uninit the importer and
shutdown the local storage
2001-05-11 Jeffrey Stedfast <fejj@ximian.com>
* mail-local.c (mail_local_reconfigure_folder): Set a title on the

View File

@ -265,6 +265,8 @@ static void
owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data)
{
unref_standard_folders ();
mail_importer_uninit ();
mail_local_storage_shutdown ();
g_idle_add_full (G_PRIORITY_LOW, idle_quit, NULL, NULL);
}

View File

@ -242,6 +242,7 @@ mail_importer_init (EvolutionShellClient *client)
void
mail_importer_uninit (void)
{
CORBA_Environment ev;
GList *l;
for (l = importer_modules; l; l = l->next) {
@ -250,5 +251,10 @@ mail_importer_uninit (void)
g_list_free (importer_modules);
importer_modules = NULL;
CORBA_exception_init (&ev);
bonobo_object_release_unref (local_storage, &ev);
local_storage = NULL;
CORBA_exception_free (&ev);
}

View File

@ -38,6 +38,8 @@ struct _MailImporter {
};
void mail_importer_init (EvolutionShellClient *client);
void mail_importer_uninit (void);
void mail_importer_add_line (MailImporter *importer,
const char *str,
gboolean finished);

View File

@ -285,10 +285,8 @@ mail_local_store_finalize (gpointer object)
CORBA_Environment ev;
CORBA_exception_init (&ev);
if (!CORBA_Object_is_nil (local_store->corba_local_storage, &ev)) {
Bonobo_Unknown_unref (local_store->corba_local_storage, &ev);
CORBA_Object_release (local_store->corba_local_storage, &ev);
}
if (!CORBA_Object_is_nil (local_store->corba_local_storage, &ev))
bonobo_object_release_unref (local_store->corba_local_storage, &ev);
CORBA_exception_free (&ev);
if (local_store->local_storage_listener)
@ -564,6 +562,8 @@ register_folder_registered(struct _mail_msg *mm)
if (local_folder->folder) {
g_hash_table_insert (local_folder->local_store->folders, local_folder->uri + 8,
local_folder);
/* Remove the circular ref once the local store knows aboutthe folder */
camel_object_unref ((CamelObject *)local_folder->local_store);
/* add the folder to the vfolder lists FIXME: merge stuff above with this */
vfolder_register_source(local_folder->folder);
@ -732,6 +732,11 @@ mail_local_storage_startup (EvolutionShellClient *shellclient,
CORBA_exception_free (&ev);
}
void
mail_local_storage_shutdown (void)
{
camel_object_unref (CAMEL_OBJECT (local_store));
}
/* Local folder reconfiguration stuff */

View File

@ -32,6 +32,7 @@
void mail_local_storage_startup (EvolutionShellClient *shellclient,
const char *evolution_path);
void mail_local_storage_shutdown (void);
void mail_local_reconfigure_folder (FolderBrowser *fb);