From 02adc1ca5f80cddea6e4b42bd7519b23f299bd50 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 19 Mar 2001 04:16:40 +0000 Subject: unref the standard folders. (owner_set_cb): Use g_atexit() to call 2001-03-18 Jeffrey Stedfast * component-factory.c (unref_standard_folders): unref the standard folders. (owner_set_cb): Use g_atexit() to call unref_standard_folders() when evolution-mail exits. This should solve the problem where these folders are not synced when evolution-mail closes (because they still had refs on them on close). svn path=/trunk/; revision=8814 --- mail/ChangeLog | 9 +++++++++ mail/component-factory.c | 13 +++++++++++++ mail/mail-crypto.c | 1 + 3 files changed, 23 insertions(+) diff --git a/mail/ChangeLog b/mail/ChangeLog index 93b35da7fd..ce7255fecf 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2001-03-18 Jeffrey Stedfast + + * component-factory.c (unref_standard_folders): unref the standard + folders. + (owner_set_cb): Use g_atexit() to call unref_standard_folders() + when evolution-mail exits. This should solve the problem where + these folders are not synced when evolution-mail closes (because + they still had refs on them on close). + 2001-03-17 Not Zed * mail-mt.c (mail_msg_free): Move the proxy event outside the lock diff --git a/mail/component-factory.c b/mail/component-factory.c index c1ed7119f4..8aa12b1e7d 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -164,6 +164,17 @@ static struct { { "Sent", &sent_folder }, }; +static void +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)); + } +} + static void got_folder (char *uri, CamelFolder *folder, void *data) { @@ -220,6 +231,8 @@ owner_set_cb (EvolutionShellComponent *shell_component, g_free (uri); } + g_atexit (unref_standard_folders); + mail_session_enable_interaction (TRUE); mail_autoreceive_setup (); diff --git a/mail/mail-crypto.c b/mail/mail-crypto.c index 744a171c8e..2d21a2e2d8 100644 --- a/mail/mail-crypto.c +++ b/mail/mail-crypto.c @@ -264,6 +264,7 @@ pgp_mime_part_sign_prepare_part (CamelMimePart *mime_part, GSList **encodings) encoding = camel_mime_part_get_encoding (mime_part); + /* FIXME: find the best encoding for this part and use that instead?? */ /* the encoding should really be QP or Base64 */ if (encoding != CAMEL_MIME_PART_ENCODING_BASE64) camel_mime_part_set_encoding (mime_part, CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE); -- cgit v1.2.3