[evolution/gnome-2-32] Bug #638808 - camel_shutdown() called too early
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-32] Bug #638808 - camel_shutdown() called too early
- Date: Tue, 11 Jan 2011 09:36:47 +0000 (UTC)
commit 9f76afb18d5432c457d066245d90a49283f16299
Author: Milan Crha <mcrha redhat com>
Date: Tue Jan 11 10:36:22 2011 +0100
Bug #638808 - camel_shutdown() called too early
mail/e-mail-backend.c | 11 ++++++++++-
shell/e-shell.c | 1 +
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 5b5c8d0..a49d3ed 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -202,7 +202,6 @@ mail_backend_poll_to_quit (EActivity *activity)
static void
mail_backend_ready_to_quit (EActivity *activity)
{
- mail_session_shutdown ();
emu_free_mail_cache ();
/* Do this last. It may terminate the process. */
@@ -380,6 +379,15 @@ mail_backend_idle_cb (EShellBackend *shell_backend)
}
static void
+mail_backend_finalize (GObject *object)
+{
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+
+ mail_session_shutdown ();
+}
+
+static void
mail_backend_constructed (GObject *object)
{
EShell *shell;
@@ -447,6 +455,7 @@ mail_backend_class_init (EMailBackendClass *class)
g_type_class_add_private (class, sizeof (EMailBackendPrivate));
object_class = G_OBJECT_CLASS (class);
+ object_class->finalize = mail_backend_finalize;
object_class->constructed = mail_backend_constructed;
shell_backend_class = E_SHELL_BACKEND_CLASS (class);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 93832ec..a168e21 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -661,6 +661,7 @@ shell_finalize (GObject *object)
if (!unique_app_is_running (UNIQUE_APP (object)))
e_file_lock_destroy ();
+ g_list_foreach (priv->loaded_backends, (GFunc) g_object_unref, NULL);
g_list_free (priv->loaded_backends);
g_free (priv->geometry);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]