diff options
author | 5 <NotZed@Ximian.com> | 2001-09-26 06:18:52 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-26 06:18:52 +0800 |
commit | ba5b1b6be7d3beed85c1f6b51d5808f9a7d72b5f (patch) | |
tree | 1cb7ee7b3057358d5540e7ebd08bc0382d7e3c8a /mail/component-factory.c | |
parent | c76e6322cf850d3e7a909ae1353bdde8b2911cac (diff) | |
download | gsoc2013-evolution-ba5b1b6be7d3beed85c1f6b51d5808f9a7d72b5f.tar gsoc2013-evolution-ba5b1b6be7d3beed85c1f6b51d5808f9a7d72b5f.tar.gz gsoc2013-evolution-ba5b1b6be7d3beed85c1f6b51d5808f9a7d72b5f.tar.bz2 gsoc2013-evolution-ba5b1b6be7d3beed85c1f6b51d5808f9a7d72b5f.tar.lz gsoc2013-evolution-ba5b1b6be7d3beed85c1f6b51d5808f9a7d72b5f.tar.xz gsoc2013-evolution-ba5b1b6be7d3beed85c1f6b51d5808f9a7d72b5f.tar.zst gsoc2013-evolution-ba5b1b6be7d3beed85c1f6b51d5808f9a7d72b5f.zip |
Deal with destroy vs finalise semantics. Only destroy widgets here.
2001-09-25 <NotZed@Ximian.com>
* folder-browser.c (folder_browser_destroy): Deal with destroy vs
finalise semantics. Only destroy widgets here.
(folder_browser_finalise): object finalise function, actually
unref/free all other objects here.
(folder_browser_class_init): Init the finalise hook.
(got_folder): Check if message_list == NULL -> we've been
destroyed before the thread got a chance to finish loading the
folder.
(folder_browser_is_drafts): Dont use a g_return_if_fail to return
in what could be a valid state of the object.
(folder_browser_is_sent): Likewise.
(folder_browser_copy): Do nothing if message_list == NULL.
* main.c (main): call mail_msg_cleanup() before leaving threads.
* component-factory.c (owner_unset_cb): Wait for all outstanding
operations to finish before setting up to quit.
(idle_quit): Wait for all outstanding ops to finish before
cleanup.
(unref_standard_folders): NULL out the standard folder before
unreffing it.
* mail-mt.c (mail_msg_wait_all): New function to wait for all
outstanding thread operations.
(mail_msg_cleanup): Destroy the io channels before we're
finished. Also wait for all outstanding threads first. Made
public.
(mail_msg_init): Dont call mail_msg_cleanup atexit automatically.
svn path=/trunk/; revision=13129
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c index cddf142891..5019702e3a 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -603,8 +603,12 @@ unref_standard_folders (void) int i; for (i = 0; i < sizeof (standard_folders) / sizeof (standard_folders[0]); i++) { - if (standard_folders[i].folder) - camel_object_unref (CAMEL_OBJECT (*standard_folders[i].folder)); + if (standard_folders[i].folder) { + CamelFolder *folder = *standard_folders[i].folder; + + *standard_folders[i].folder = NULL; + camel_object_unref (CAMEL_OBJECT (folder)); + } } } @@ -712,6 +716,8 @@ free_storage (gpointer service, gpointer storage, gpointer data) static gboolean idle_quit (gpointer user_data) { + mail_msg_wait_all(); + if (e_list_length (folder_browser_factory_get_control_list ())) return TRUE; @@ -730,6 +736,8 @@ owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data) if (mail_config_get_empty_trash_on_exit ()) empty_trash (NULL, NULL, NULL); + + mail_msg_wait_all(); unref_standard_folders (); mail_importer_uninit (); |