[balsa/gmime3: 25/66] g_mime_content_type_new_from_string()
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gmime3: 25/66] g_mime_content_type_new_from_string()
- Date: Fri, 21 Feb 2020 19:49:53 +0000 (UTC)
commit 835d800d8d64ff030855b905cc78144d61157223
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Nov 20 19:35:08 2019 -0800
g_mime_content_type_new_from_string()
has been replaced by g_mime_content_type_parse() and now takes a
GMimeParserOptions argument.
libbalsa/body.c | 2 +-
libbalsa/mailbox_imap.c | 2 +-
libbalsa/message.c | 4 ++--
libbalsa/rfc3156.c | 2 +-
src/balsa-message.c | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/libbalsa/body.c b/libbalsa/body.c
index d5f87dcd7..e30ef2ed8 100644
--- a/libbalsa/body.c
+++ b/libbalsa/body.c
@@ -304,7 +304,7 @@ libbalsa_message_body_get_parameter(LibBalsaMessageBody * body,
type = g_mime_object_get_content_type(body->mime_part);
res = g_strdup(g_mime_content_type_get_parameter(type, param));
} else if (body->content_type) {
- type = g_mime_content_type_new_from_string(body->content_type);
+ type = g_mime_content_type_parse(libbalsa_parser_options(), body->content_type);
res = g_strdup(g_mime_content_type_get_parameter(type, param));
g_object_unref(type);
}
diff --git a/libbalsa/mailbox_imap.c b/libbalsa/mailbox_imap.c
index 8724c81bb..8114dd86e 100644
--- a/libbalsa/mailbox_imap.c
+++ b/libbalsa/mailbox_imap.c
@@ -2567,7 +2567,7 @@ lbm_imap_get_msg_part(LibBalsaMessage * msg, LibBalsaMessageBody * part,
if (!part->mime_part) {
GMimeContentType *type =
- g_mime_content_type_new_from_string(part->content_type);
+ g_mime_content_type_parse(libbalsa_parser_options(), part->content_type);
if (g_mime_content_type_is_type(type, "multipart", "*")) {
if (g_mime_content_type_is_type(type, "multipart", "signed"))
part->mime_part =
diff --git a/libbalsa/message.c b/libbalsa/message.c
index 7f77690a3..bdefeecf6 100644
--- a/libbalsa/message.c
+++ b/libbalsa/message.c
@@ -1017,7 +1017,7 @@ lb_message_headers_basic_from_gmime(LibBalsaMessageHeaders *headers,
g_return_if_fail(headers->content_type == NULL);
content_type = g_mime_object_get_content_type(mime_msg->mime_part);
str = g_mime_content_type_get_mime_type(content_type);
- headers->content_type = g_mime_content_type_new_from_string(str);
+ headers->content_type = g_mime_content_type_parse(libbalsa_parser_options(), str);
g_free(str);
}
}
@@ -1253,7 +1253,7 @@ lbmsg_set_header(LibBalsaMessage *message,
libbalsa_message_set_references_from_string(message, value);
} else if ((message->headers->content_type == NULL) &&
(g_ascii_strcasecmp(name, "Content-Type") == 0)) {
- message->headers->content_type = g_mime_content_type_new_from_string(value);
+ message->headers->content_type = g_mime_content_type_parse(libbalsa_parser_options(), value);
} else if ((message->headers->dispnotify_to == NULL) &&
(g_ascii_strcasecmp(name, "Disposition-Notification-To") == 0)) {
message->headers->dispnotify_to = internet_address_list_parse(libbalsa_parser_options(), value);
diff --git a/libbalsa/rfc3156.c b/libbalsa/rfc3156.c
index 438aa0de2..1aec1a5ce 100644
--- a/libbalsa/rfc3156.c
+++ b/libbalsa/rfc3156.c
@@ -68,7 +68,7 @@ body_is_type(LibBalsaMessageBody * body, const gchar * type,
retval = g_mime_content_type_is_type(content_type, type, sub_type);
} else {
GMimeContentType *content_type =
- g_mime_content_type_new_from_string(body->content_type);
+ g_mime_content_type_parse(libbalsa_parser_options(), body->content_type);
retval = g_mime_content_type_is_type(content_type, type, sub_type);
g_object_unref(content_type);
}
diff --git a/src/balsa-message.c b/src/balsa-message.c
index 73be5817d..d67760cf0 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -2145,7 +2145,7 @@ add_multipart_mixed(BalsaMessage * balsa_message, LibBalsaMessageBody * body,
retval = add_body(balsa_message, body, container);
for (body = body->next; body; body = body->next) {
GMimeContentType *type =
- g_mime_content_type_new_from_string(body->content_type);
+ g_mime_content_type_parse(libbalsa_parser_options(), body->content_type);
if (libbalsa_message_body_is_inline(body) ||
balsa_message->force_inline ||
@@ -2173,7 +2173,7 @@ add_multipart(BalsaMessage *balsa_message, LibBalsaMessageBody *body,
if (!body->parts)
return body;
- type=g_mime_content_type_new_from_string(body->content_type);
+ type = g_mime_content_type_parse(libbalsa_parser_options(), body->content_type);
if (g_mime_content_type_is_type(type, "multipart", "related")) {
/* add the compound object root part */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]