[balsa] Use g_mime_object_encode when available
- From: Peter Bloomfield <PeterB src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [balsa] Use g_mime_object_encode when available
- Date: Thu, 8 Oct 2009 14:08:08 +0000 (UTC)
commit 0dc3a02ec8eecdfe8081a6fabab21aead65db5f3
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Thu Oct 8 10:06:41 2009 -0400
Use g_mime_object_encode when available
ChangeLog | 5 +++++
libbalsa/mailbox_mbox.c | 13 +++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7bd6bca..947a263 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-10-08 Peter Bloomfield
+ * libbalsa/mailbox_mbox.c (lbm_mbox_armored_object): use
+ g_mime_object_encode when available.
+
+2009-10-08 Peter Bloomfield
+
* src/address-book-config.c (edit_book_response): check for NULL
address-book.
diff --git a/libbalsa/mailbox_mbox.c b/libbalsa/mailbox_mbox.c
index e9de351..946b553 100644
--- a/libbalsa/mailbox_mbox.c
+++ b/libbalsa/mailbox_mbox.c
@@ -1843,6 +1843,13 @@ static void update_message_status_headers(GMimeMessage *message,
g_string_free(new_header, TRUE);
}
+#if defined(GMIME_MAJOR_VERSION)
+# if GMIME_CHECK_VERSION(2, 6, 0)
+# define HAVE_GMIME_2_6 TRUE
+# endif /* GMIME_CHECK_VERSION(2, 6, 0) */
+#endif /* defined(GMIME_MAJOR_VERSION) */
+
+#if !defined(HAVE_GMIME_2_6)
/*
* Encode text parts as quoted-printable.
*/
@@ -1892,6 +1899,7 @@ lbm_mbox_prepare_object(GMimeObject * object)
(mime_part, GMIME_CONTENT_ENCODING_QUOTEDPRINTABLE);
}
}
+#endif /* defined(HAVE_GMIME_2_6) */
static GMimeObject *
lbm_mbox_armored_object(GMimeStream * stream)
@@ -1902,7 +1910,12 @@ lbm_mbox_armored_object(GMimeStream * stream)
parser = g_mime_parser_new_with_stream(stream);
object = GMIME_OBJECT(g_mime_parser_construct_message(parser));
g_object_unref(parser);
+
+#if defined(HAVE_GMIME_2_6)
+ g_mime_object_encode(object, GMIME_ENCODING_CONSTRAINT_7BIT);
+#else /* defined(HAVE_GMIME_2_6) */
lbm_mbox_prepare_object(object);
+#endif /* defined(HAVE_GMIME_2_6) */
return object;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]