aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog16
-rw-r--r--composer/e-msg-composer-attachment-bar.c12
-rw-r--r--composer/e-msg-composer-attachment.c4
-rw-r--r--composer/e-msg-composer.c36
-rw-r--r--mail/ChangeLog29
-rw-r--r--mail/component-factory.c2
-rw-r--r--mail/folder-browser.c2
-rw-r--r--mail/importers/evolution-mbox-importer.c2
-rw-r--r--mail/mail-autofilter.c2
-rw-r--r--mail/mail-callbacks.c2
-rw-r--r--mail/mail-display.c8
-rw-r--r--mail/mail-format.c66
-rw-r--r--mail/mail-ops.c6
-rw-r--r--mail/message-list.c4
-rw-r--r--mail/message-tag-followup.c8
15 files changed, 77 insertions, 122 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 6caf503db7..d077cd9316 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,19 +1,3 @@
-2003-08-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (message_rfc822_dnd):
- s/HSCAN_/CAMEL_MIME_PARSER_STATE_/g
-
-2003-08-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c: updated for namespace changed
- made to camel-mime-utils.[c,h]
-
- * e-msg-composer-attachment.c: updated for namespace changed made
- to camel-mime-utils.[c,h]
-
- * e-msg-composer.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
2003-08-19 Jeffrey Stedfast <fejj@ximian.com>
* Original patch from David Woodhouse, but modified a bit by me.
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index 479fd99871..7e7d9227c3 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -231,7 +231,7 @@ update (EMsgComposerAttachmentBar *bar)
content_type = camel_mime_part_get_content_type (attachment->body);
/* Get the image out of the attachment
and create a thumbnail for it */
- image = camel_content_type_is (content_type, "image", "*");
+ image = header_content_type_is (content_type, "image", "*");
if (image && attachment->pixbuf_cache == NULL) {
CamelDataWrapper *wrapper;
@@ -304,7 +304,7 @@ update (EMsgComposerAttachmentBar *bar)
} else {
char *mime_type;
- mime_type = camel_content_type_simple (content_type);
+ mime_type = header_content_type_simple (content_type);
pixbuf = e_icon_for_mime_type (mime_type, 48);
g_free (mime_type);
gnome_icon_list_append_pixbuf (icon_list, pixbuf, NULL, label);
@@ -725,7 +725,7 @@ attach_to_multipart (CamelMultipart *multipart,
content = camel_medium_get_content_object (CAMEL_MEDIUM (attachment->body));
if (!CAMEL_IS_MULTIPART (content)) {
- if (camel_content_type_is (content_type, "text", "*")) {
+ if (header_content_type_is (content_type, "text", "*")) {
CamelMimePartEncodingType encoding;
CamelStreamFilter *filter_stream;
CamelMimeFilterBestenc *bestenc;
@@ -733,7 +733,7 @@ attach_to_multipart (CamelMultipart *multipart,
const char *charset;
char *type;
- charset = camel_content_type_param (content_type, "charset");
+ charset = header_content_type_param (content_type, "charset");
stream = camel_stream_null_new ();
filter_stream = camel_stream_filter_new_with_stream (stream);
@@ -762,8 +762,8 @@ attach_to_multipart (CamelMultipart *multipart,
if (!charset) {
/* looks kinda nasty, but this is how ya have to do it */
- camel_content_type_set_param (content_type, "charset", default_charset);
- type = camel_content_type_format (content_type);
+ header_content_type_set_param (content_type, "charset", default_charset);
+ type = header_content_type_format (content_type);
camel_mime_part_set_content_type (attachment->body, type);
g_free (type);
}
diff --git a/composer/e-msg-composer-attachment.c b/composer/e-msg-composer-attachment.c
index 5942b51340..fb7fe46073 100644
--- a/composer/e-msg-composer-attachment.c
+++ b/composer/e-msg-composer-attachment.c
@@ -220,7 +220,7 @@ e_msg_composer_attachment_new (const char *file_name,
workaround, don't set a Content-Id on these parts. Fixes
bug #10032 */
/* set the Content-Id */
- content_id = camel_header_msgid_generate ();
+ content_id = header_msgid_generate ();
camel_mime_part_set_content_id (part, content_id);
g_free (content_id);
#endif
@@ -430,7 +430,7 @@ e_msg_composer_attachment_edit (EMsgComposerAttachment *attachment, GtkWidget *p
set_entry (editor_gui, "description_entry",
camel_mime_part_get_description (attachment->body));
content_type = camel_mime_part_get_content_type (attachment->body);
- type = camel_content_type_simple (content_type);
+ type = header_content_type_simple (content_type);
set_entry (editor_gui, "mime_type_entry", type);
g_free (type);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 3a4ec93e86..5a78a68a02 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -388,7 +388,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
}
data = g_byte_array_new ();
g_byte_array_append (data, composer->mime_body, strlen (composer->mime_body));
- type = camel_content_type_decode (composer->mime_type);
+ type = header_content_type_decode (composer->mime_type);
} else {
data = get_text (composer->persist_stream_interface, "text/plain");
if (!data) {
@@ -399,9 +399,9 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
/* FIXME: we may want to do better than this... */
charset = best_charset (data, composer->charset, &plain_encoding);
- type = camel_content_type_new ("text", "plain");
+ type = header_content_type_new ("text", "plain");
if (charset)
- camel_content_type_set_param (type, "charset", charset);
+ header_content_type_set_param (type, "charset", charset);
}
stream = camel_stream_mem_new_with_byte_array (data);
@@ -426,7 +426,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
camel_object_unref (stream);
camel_data_wrapper_set_mime_type_field (plain, type);
- camel_content_type_unref (type);
+ header_content_type_unref (type);
if (composer->send_html) {
CORBA_Environment ev;
@@ -2535,7 +2535,7 @@ message_rfc822_dnd (EMsgComposer *composer, CamelStream *stream)
camel_mime_parser_scan_from (mp, TRUE);
camel_mime_parser_init_with_stream (mp, stream);
- while (camel_mime_parser_step (mp, 0, 0) == CAMEL_MIME_PARSER_STATE_FROM) {
+ while (camel_mime_parser_step (mp, 0, 0) == HSCAN_FROM) {
CamelMimeMessage *message;
CamelMimePart *part;
@@ -3211,10 +3211,10 @@ add_attachments_handle_mime_part (EMsgComposer *composer, CamelMimePart *mime_pa
e_msg_composer_add_inline_image_from_mime_part (composer, mime_part);
} else if (CAMEL_IS_MIME_MESSAGE (wrapper)) {
/* do nothing */
- } else if (related && camel_content_type_is (content_type, "image", "*")) {
+ } else if (related && header_content_type_is (content_type, "image", "*")) {
e_msg_composer_add_inline_image_from_mime_part (composer, mime_part);
} else {
- if (camel_content_type_is (content_type, "text", "*")) {
+ if (header_content_type_is (content_type, "text", "*")) {
/* do nothing */
} else {
e_msg_composer_attach (composer, mime_part);
@@ -3231,7 +3231,7 @@ add_attachments_from_multipart (EMsgComposer *composer, CamelMultipart *multipar
gboolean related;
int i, nparts;
- related = camel_content_type_is (CAMEL_DATA_WRAPPER (multipart)->mime_type, "multipart", "related");
+ related = header_content_type_is (CAMEL_DATA_WRAPPER (multipart)->mime_type, "multipart", "related");
if (CAMEL_IS_MULTIPART_SIGNED (multipart)) {
mime_part = camel_multipart_get_part (multipart, CAMEL_MULTIPART_SIGNED_CONTENT);
@@ -3303,14 +3303,14 @@ handle_multipart_signed (EMsgComposer *composer, CamelMultipart *multipart, int
} else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
/* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
handle_multipart_encrypted (composer, multipart, depth);
- } else if (camel_content_type_is (content_type, "multipart", "alternative")) {
+ } else if (header_content_type_is (content_type, "multipart", "alternative")) {
/* this contains the text/plain and text/html versions of the message body */
handle_multipart_alternative (composer, multipart, depth);
} else {
/* there must be attachments... */
handle_multipart (composer, multipart, depth);
}
- } else if (camel_content_type_is (content_type, "text", "*")) {
+ } else if (header_content_type_is (content_type, "text", "*")) {
char *text;
if ((text = mail_get_message_body (content, FALSE, FALSE)))
@@ -3360,14 +3360,14 @@ handle_multipart_encrypted (EMsgComposer *composer, CamelMultipart *multipart, i
} else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
/* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
handle_multipart_encrypted (composer, multipart, depth);
- } else if (camel_content_type_is (content_type, "multipart", "alternative")) {
+ } else if (header_content_type_is (content_type, "multipart", "alternative")) {
/* this contains the text/plain and text/html versions of the message body */
handle_multipart_alternative (composer, multipart, depth);
} else {
/* there must be attachments... */
handle_multipart (composer, multipart, depth);
}
- } else if (camel_content_type_is (content_type, "text", "*")) {
+ } else if (header_content_type_is (content_type, "text", "*")) {
char *text;
if ((text = mail_get_message_body (content, FALSE, FALSE)))
@@ -3412,11 +3412,11 @@ handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart,
/* depth doesn't matter so long as we don't pass 0 */
handle_multipart (composer, mp, depth + 1);
}
- } else if (camel_content_type_is (content_type, "text", "html")) {
+ } else if (header_content_type_is (content_type, "text", "html")) {
/* text/html is preferable, so once we find it we're done... */
text_part = mime_part;
break;
- } else if (camel_content_type_is (content_type, "text", "*")) {
+ } else if (header_content_type_is (content_type, "text", "*")) {
/* anyt text part not text/html is second rate so the first
text part we find isn't necessarily the one we'll use. */
if (!text_part)
@@ -3463,7 +3463,7 @@ handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth)
} else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
/* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
handle_multipart_encrypted (composer, mp, depth + 1);
- } else if (camel_content_type_is (content_type, "multipart", "alternative")) {
+ } else if (header_content_type_is (content_type, "multipart", "alternative")) {
handle_multipart_alternative (composer, mp, depth + 1);
} else {
/* depth doesn't matter so long as we don't pass 0 */
@@ -3553,7 +3553,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
EDestination **Tov, **Ccv, **Bccv;
GHashTable *auto_cc, *auto_bcc;
CamelContentType *content_type;
- struct _camel_header_raw *headers;
+ struct _header_raw *headers;
CamelDataWrapper *content;
EAccount *account = NULL;
char *account_name;
@@ -3736,7 +3736,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
} else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
/* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
handle_multipart_encrypted (new, multipart, 0);
- } else if (camel_content_type_is (content_type, "multipart", "alternative")) {
+ } else if (header_content_type_is (content_type, "multipart", "alternative")) {
/* this contains the text/plain and text/html versions of the message body */
handle_multipart_alternative (new, multipart, 0);
} else {
@@ -4188,7 +4188,7 @@ e_msg_composer_add_inline_image_from_file (EMsgComposer *composer,
camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper);
camel_object_unref (wrapper);
- cid = camel_header_msgid_generate ();
+ cid = header_msgid_generate ();
camel_mime_part_set_content_id (part, cid);
name = g_path_get_basename(file_name);
camel_mime_part_set_filename (part, name);
diff --git a/mail/ChangeLog b/mail/ChangeLog
index a915e2a55a..abde61e489 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,32 +1,3 @@
-2003-08-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c: Updated for camel namespace changes.
-
- * folder-browser.c: Same.
-
- * mail-autofilter.c: Here too.
-
- * mail-callbacks.c: And here.
-
- * importers/evolution-mbox-importer.c: And finally here.
-
-2003-08-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * mail-format.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * mail-ops.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * message-list.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
- * message-tag-followup.c: updated for namespace changed made to
- camel-mime-utils.[c,h]
-
2003-08-22 Not Zed <NotZed@Ximian.com>
* mail-format.c (write_date): translate the local time format.
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 4f193e8d9d..8789bcde8a 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -531,7 +531,7 @@ message_rfc822_dnd (CamelFolder *dest, CamelStream *stream, CamelException *ex)
camel_mime_parser_scan_from (mp, TRUE);
camel_mime_parser_init_with_stream (mp, stream);
- while (camel_mime_parser_step (mp, 0, 0) == CAMEL_MIME_PARSER_STATE_FROM) {
+ while (camel_mime_parser_step (mp, 0, 0) == HSCAN_FROM) {
CamelMessageInfo *info;
CamelMimeMessage *msg;
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index edb2ceaf3f..a886cfe77d 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -475,7 +475,7 @@ message_rfc822_dnd (CamelFolder *dest, CamelStream *stream, CamelException *ex)
camel_mime_parser_scan_from (mp, TRUE);
camel_mime_parser_init_with_stream (mp, stream);
- while (camel_mime_parser_step (mp, 0, 0) == CAMEL_MIME_PARSER_STATE_FROM) {
+ while (camel_mime_parser_step (mp, 0, 0) == HSCAN_FROM) {
CamelMessageInfo *info;
CamelMimeMessage *msg;
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 134f6b9233..ef31667e64 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -133,7 +133,7 @@ process_item_fn (EvolutionImporter *eimporter,
}
ex = camel_exception_new ();
- if (camel_mime_parser_step (mbi->mp, 0, 0) == CAMEL_MIME_PARSER_STATE_FROM) {
+ if (camel_mime_parser_step (mbi->mp, 0, 0) == HSCAN_FROM) {
/* Import the next message */
CamelMimeMessage *msg;
CamelMessageInfo *info;
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index 338eb51eaa..f396b00d43 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -265,7 +265,7 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg
if (flags & AUTO_MLIST) {
char *name, *mlist;
- mlist = camel_header_raw_check_mailing_list(&((CamelMimePart *)msg)->headers);
+ mlist = header_raw_check_mailing_list(&((CamelMimePart *)msg)->headers);
if (mlist) {
rule_match_mlist(context, rule, mlist);
name = g_strdup_printf (_("%s mailing list"), mlist);
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 35815f8866..21690c55ce 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -2202,7 +2202,7 @@ flag_followup_completed (BonoboUIComponent *uih, void *user_data, const char *pa
uids = g_ptr_array_new ();
message_list_foreach (fb->message_list, enumerate_msg, uids);
- now = camel_header_format_date (time (NULL), 0);
+ now = header_format_date (time (NULL), 0);
camel_folder_freeze (fb->folder);
for (i = 0; i < uids->len; i++) {
diff --git a/mail/mail-display.c b/mail/mail-display.c
index ec774e71c1..f9dc8580dd 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -1056,7 +1056,7 @@ drag_data_get_cb (GtkWidget *widget,
g_object_set_data_full ((GObject *) widget, "uri-list", uri_list, g_free);
break;
case DND_TARGET_TYPE_PART_MIME_TYPE:
- if (camel_content_type_is (((CamelDataWrapper *) part)->mime_type, "text", "*")) {
+ if (header_content_type_is (((CamelDataWrapper *) part)->mime_type, "text", "*")) {
GByteArray *ba;
ba = mail_format_get_data_wrapper_text ((CamelDataWrapper *) part, NULL);
@@ -1149,7 +1149,7 @@ do_attachment_header (GtkHTML *html, GtkHTMLEmbedded *eb,
}
/* Drag & Drop */
- drag_types[DND_TARGET_TYPE_PART_MIME_TYPE].target = camel_content_type_simple (((CamelDataWrapper *) part)->mime_type);
+ drag_types[DND_TARGET_TYPE_PART_MIME_TYPE].target = header_content_type_simple (((CamelDataWrapper *) part)->mime_type);
camel_strdown (drag_types[DND_TARGET_TYPE_PART_MIME_TYPE].target);
gtk_drag_source_set (button, GDK_BUTTON1_MASK,
@@ -1389,7 +1389,7 @@ on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle,
html_stream = mail_display_stream_new (html, handle);
- if (camel_content_type_is (content_type, "text", "*")) {
+ if (header_content_type_is (content_type, "text", "*")) {
mail_format_data_wrapper_write_to_stream (wrapper, TRUE, md, html_stream);
} else {
camel_data_wrapper_decode_to_stream (wrapper, html_stream);
@@ -1997,7 +1997,7 @@ mail_display_render (MailDisplay *md, GtkHTML *html, gboolean reset_scroll)
due_by = camel_tag_get (&md->info->user_tags, "due-by");
if (due_by && *due_by) {
- target_date = camel_header_decode_date (due_by, &offset);
+ target_date = header_decode_date (due_by, &offset);
now = time (NULL);
if (now >= target_date)
overdue = _("Overdue:");
diff --git a/mail/mail-format.c b/mail/mail-format.c
index efe889dafe..92428af592 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -553,13 +553,13 @@ mail_part_is_inline (CamelMimePart *part)
* be customizable.
*/
content_type = camel_mime_part_get_content_type (part);
- if (!camel_content_type_is (content_type, "message", "*"))
+ if (!header_content_type_is (content_type, "message", "*"))
return TRUE;
/* Otherwise, display it inline if it's "anonymous", and
* as an attachment otherwise.
*/
- type = camel_content_type_simple (content_type);
+ type = header_content_type_simple (content_type);
anon = is_anonymous (part, type);
g_free (type);
@@ -787,8 +787,8 @@ write_date (MailDisplayStream *stream, CamelMimeMessage *message, int flags)
time_t msg_date;
struct tm local;
int local_tz;
-
- msg_date = camel_header_decode_date(datestr, &msg_offset);
+
+ msg_date = header_decode_date(datestr, &msg_offset);
e_localtime_with_offset(msg_date, &local, &local_tz);
write_field_row_begin(stream, _("Date"), flags);
@@ -1073,20 +1073,20 @@ write_headers (MailDisplayStream *stream, MailDisplay *md, CamelMimeMessage *mes
bgcolor, fontcolor);
if (full) {
- struct _camel_header_raw *header;
+ struct _header_raw *header;
const char *charset;
CamelContentType *ct;
char *value;
ct = camel_mime_part_get_content_type (CAMEL_MIME_PART (message));
- charset = camel_content_type_param (ct, "charset");
+ charset = header_content_type_param (ct, "charset");
charset = e_iconv_charset_name (charset);
header = CAMEL_MIME_PART (message)->headers;
while (header) {
i = default_header_index (header->name);
if (i == -1) {
- value = camel_header_decode_string (header->value, charset);
+ value = header_decode_string (header->value, charset);
write_text_header (stream, header->name, value, WRITE_NOCOLUMNS);
g_free (value);
} else
@@ -1170,7 +1170,7 @@ mail_format_data_wrapper_write_to_stream (CamelDataWrapper *wrapper, gboolean de
if (mail_display && mail_display->charset) {
/* user override charset */
charset = g_strdup (mail_display->charset);
- } else if (content_type && (charset = (char *) camel_content_type_param (content_type, "charset"))) {
+ } else if (content_type && (charset = (char *) header_content_type_param (content_type, "charset"))) {
/* try to use the charset declared in the Content-Type header */
if (!strncasecmp (charset, "iso-8859-", 9)) {
/* Since a few Windows mailers like to claim they sent
@@ -1297,8 +1297,8 @@ handle_text_plain (CamelMimePart *part, const char *mime_type,
/* Check for RFC 2646 flowed text. */
type = camel_mime_part_get_content_type (part);
- if (camel_content_type_is (type, "text", "plain")) {
- format = camel_content_type_param (type, "format");
+ if (header_content_type_is (type, "text", "plain")) {
+ format = header_content_type_param (type, "format");
if (format && !strcasecmp (format, "flowed"))
flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED;
@@ -1443,7 +1443,7 @@ handle_multipart_encrypted (CamelMimePart *part, const char *mime_type,
gboolean handled;
/* Currently we only handle RFC2015-style PGP encryption. */
- protocol = camel_content_type_param (((CamelDataWrapper *) part)->mime_type, "protocol");
+ protocol = header_content_type_param (((CamelDataWrapper *) part)->mime_type, "protocol");
if (!protocol || strcmp (protocol, "application/pgp-encrypted") != 0)
return handle_multipart_mixed (part, mime_type, md, stream);
@@ -1610,7 +1610,7 @@ handle_multipart_related (CamelMimePart *part, const char *mime_type,
nparts = camel_multipart_get_number (mp);
content_type = camel_mime_part_get_content_type (part);
- start = camel_content_type_param (content_type, "start");
+ start = header_content_type_param (content_type, "start");
if (start) {
int len;
@@ -1700,7 +1700,7 @@ find_preferred_alternative (CamelMultipart *multipart, gboolean want_plain)
for (i = 0; i < nparts; i++) {
CamelMimePart *part = camel_multipart_get_part (multipart, i);
CamelContentType *type = camel_mime_part_get_content_type (part);
- char *mime_type = camel_content_type_simple (type);
+ char *mime_type = header_content_type_simple (type);
camel_strdown (mime_type);
if (want_plain && !strcmp (mime_type, "text/plain"))
@@ -1790,7 +1790,7 @@ handle_message_external_body (CamelMimePart *part, const char *mime_type,
char *url = NULL, *desc = NULL;
type = camel_mime_part_get_content_type (part);
- access_type = camel_content_type_param (type, "access-type");
+ access_type = header_content_type_param (type, "access-type");
if (!access_type)
goto fallback;
@@ -1799,12 +1799,12 @@ handle_message_external_body (CamelMimePart *part, const char *mime_type,
const char *name, *site, *dir, *mode, *ftype;
char *path;
- name = camel_content_type_param (type, "name");
- site = camel_content_type_param (type, "site");
+ name = header_content_type_param (type, "name");
+ site = header_content_type_param (type, "site");
if (name == NULL || site == NULL)
goto fallback;
- dir = camel_content_type_param (type, "directory");
- mode = camel_content_type_param (type, "mode");
+ dir = header_content_type_param (type, "directory");
+ mode = header_content_type_param (type, "mode");
/* Generate the path. */
if (dir) {
@@ -1834,10 +1834,10 @@ handle_message_external_body (CamelMimePart *part, const char *mime_type,
} else if (!g_ascii_strcasecmp (access_type, "local-file")) {
const char *name, *site;
- name = camel_content_type_param (type, "name");
+ name = header_content_type_param (type, "name");
if (name == NULL)
goto fallback;
- site = camel_content_type_param (type, "site");
+ site = header_content_type_param (type, "site");
url = g_strdup_printf ("file://%s%s", *name == '/' ? "" : "/", name);
if (site) {
@@ -1852,7 +1852,7 @@ handle_message_external_body (CamelMimePart *part, const char *mime_type,
/* RFC 2017 */
- urlparam = camel_content_type_param (type, "url");
+ urlparam = header_content_type_param (type, "url");
if (urlparam == NULL)
goto fallback;
@@ -1981,7 +1981,7 @@ mail_get_message_rfc822 (CamelMimeMessage *message, gboolean want_plain, gboolea
}
date_val = camel_mime_message_get_date (message, &offset);
- buf = camel_header_format_date (date_val, offset);
+ buf = header_format_date (date_val, offset);
html = camel_text_to_html (buf, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0);
g_string_append_printf (retval, "%s<b>Date:</b> %s<br>", citation, html);
g_free (html);
@@ -2031,18 +2031,18 @@ mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cit
/* If it is message/rfc822 or message/news, extract the
* important headers and recursively process the body.
*/
- if (camel_content_type_is (mime_type, "message", "rfc822") ||
- camel_content_type_is (mime_type, "message", "news"))
+ if (header_content_type_is (mime_type, "message", "rfc822") ||
+ header_content_type_is (mime_type, "message", "news"))
return mail_get_message_rfc822 (CAMEL_MIME_MESSAGE (data), want_plain, cite);
/* If it's a vcard or icalendar, ignore it. */
- if (camel_content_type_is (mime_type, "text", "x-vcard") ||
- camel_content_type_is (mime_type, "text", "calendar"))
+ if (header_content_type_is (mime_type, "text", "x-vcard") ||
+ header_content_type_is (mime_type, "text", "calendar"))
return NULL;
/* Get the body data for other text/ or message/ types */
- if (camel_content_type_is (mime_type, "text", "*") ||
- camel_content_type_is (mime_type, "message", "*")) {
+ if (header_content_type_is (mime_type, "text", "*") ||
+ header_content_type_is (mime_type, "message", "*")) {
bytes = mail_format_get_data_wrapper_text (data, NULL);
if (bytes) {
@@ -2051,12 +2051,12 @@ mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cit
g_byte_array_free (bytes, FALSE);
}
- if (text && !camel_content_type_is(mime_type, "text", "html")) {
+ if (text && !header_content_type_is(mime_type, "text", "html")) {
char *html;
- if (camel_content_type_is(mime_type, "text", "richtext"))
+ if (header_content_type_is(mime_type, "text", "richtext"))
html = camel_enriched_to_html(text, CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT);
- else if (camel_content_type_is(mime_type, "text", "enriched"))
+ else if (header_content_type_is(mime_type, "text", "enriched"))
html = camel_enriched_to_html(text, 0);
else
html = camel_text_to_html (text, CAMEL_MIME_FILTER_TOHTML_PRE |
@@ -2071,7 +2071,7 @@ mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cit
/* If it's not message and it's not text, and it's not
* multipart, we don't want to deal with it.
*/
- if (!camel_content_type_is (mime_type, "multipart", "*"))
+ if (!header_content_type_is (mime_type, "multipart", "*"))
return NULL;
mp = CAMEL_MULTIPART (data);
@@ -2085,7 +2085,7 @@ mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cit
data = camel_medium_get_content_object (CAMEL_MEDIUM (subpart));
return mail_get_message_body (data, want_plain, cite);
- } else if (camel_content_type_is (mime_type, "multipart", "alternative")) {
+ } else if (header_content_type_is (mime_type, "multipart", "alternative")) {
/* Pick our favorite alternative and reply to it. */
subpart = find_preferred_alternative (mp, want_plain);
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 397df4c418..489dda4402 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1936,7 +1936,7 @@ save_prepare_part (CamelMimePart *mime_part)
/* We want to save textual parts as 8bit instead of encoded */
type = camel_data_wrapper_get_mime_type_field (wrapper);
- if (camel_content_type_is (type, "text", "*"))
+ if (header_content_type_is (type, "text", "*"))
camel_mime_part_set_encoding (mime_part, CAMEL_MIME_PART_ENCODING_8BIT);
}
}
@@ -2087,8 +2087,8 @@ save_part_save (struct _mail_msg *mm)
data = camel_medium_get_content_object (CAMEL_MEDIUM (m->part));
content_type = camel_mime_part_get_content_type (m->part);
- if (camel_content_type_is (content_type, "text", "*")
- && (charset = camel_content_type_param (content_type, "charset"))
+ if (header_content_type_is (content_type, "text", "*")
+ && (charset = header_content_type_param (content_type, "charset"))
&& strcasecmp (charset, "utf-8") != 0) {
charsetfilter = camel_mime_filter_charset_new_convert ("utf-8", charset);
filtered_stream = (CamelStream *) camel_stream_filter_new_with_stream (stream_fs);
diff --git a/mail/message-list.c b/mail/message-list.c
index 93722e6d87..77e03b656e 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -931,7 +931,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
tag = camel_tag_get ((CamelTag **) &msg_info->user_tags, "due-by");
if (tag && *tag) {
- due_by = camel_header_decode_date (tag, NULL);
+ due_by = header_decode_date (tag, NULL);
return GINT_TO_POINTER (due_by);
} else {
return GINT_TO_POINTER (0);
@@ -1001,7 +1001,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
time_t now = time (NULL);
time_t target_date;
- target_date = camel_header_decode_date (due_by, NULL);
+ target_date = header_decode_date (due_by, NULL);
if (now >= target_date) {
/* FIXME: extract from the xpm somehow. */
colour = "#A7453E";
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
index 6a2f62eaf6..6c8472bad5 100644
--- a/mail/message-tag-followup.c
+++ b/mail/message-tag-followup.c
@@ -149,7 +149,7 @@ get_tag_list (MessageTagEditor *editor)
date = e_date_edit_get_time (followup->target_date);
if (date != (time_t) -1) {
- text = camel_header_format_date (date, 0);
+ text = header_format_date (date, 0);
camel_tag_set (&tags, "due-by", text);
g_free (text);
} else {
@@ -157,7 +157,7 @@ get_tag_list (MessageTagEditor *editor)
}
if (gtk_toggle_button_get_active (followup->completed)) {
- text = camel_header_format_date (followup->completed_date, 0);
+ text = header_format_date (followup->completed_date, 0);
camel_tag_set (&tags, "completed-on", text);
g_free (text);
} else {
@@ -180,7 +180,7 @@ set_tag_list (MessageTagEditor *editor, CamelTag *tags)
text = camel_tag_get (&tags, "due-by");
if (text && *text) {
- date = camel_header_decode_date (text, NULL);
+ date = header_decode_date (text, NULL);
e_date_edit_set_time (followup->target_date, date);
} else {
e_date_edit_set_time (followup->target_date, (time_t) -1);
@@ -188,7 +188,7 @@ set_tag_list (MessageTagEditor *editor, CamelTag *tags)
text = camel_tag_get (&tags, "completed-on");
if (text && *text) {
- date = camel_header_decode_date (text, NULL);
+ date = header_decode_date (text, NULL);
if (date != (time_t) 0) {
gtk_toggle_button_set_active (followup->completed, TRUE);
followup->completed_date = date;