diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-08-26 05:20:46 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-08-26 05:20:46 +0800 |
commit | dd0ff66d1f720715e8105f98096a44ffcec46d61 (patch) | |
tree | 53045a9415f202ca34ad0d25e821bea4345878fe /mail | |
parent | 5ba76c10796e49a6b12bdc7ee7f0a5da4a173e62 (diff) | |
download | gsoc2013-evolution-dd0ff66d1f720715e8105f98096a44ffcec46d61.tar.gz gsoc2013-evolution-dd0ff66d1f720715e8105f98096a44ffcec46d61.tar.zst gsoc2013-evolution-dd0ff66d1f720715e8105f98096a44ffcec46d61.zip |
updated for namespace changed made to camel-mime-utils.[c,h]
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]
svn path=/trunk/; revision=22357
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 17 | ||||
-rw-r--r-- | mail/mail-display.c | 8 | ||||
-rw-r--r-- | mail/mail-format.c | 66 | ||||
-rw-r--r-- | mail/mail-ops.c | 6 | ||||
-rw-r--r-- | mail/message-list.c | 4 | ||||
-rw-r--r-- | mail/message-tag-followup.c | 8 |
6 files changed, 63 insertions, 46 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index abde61e489..3d0d9e9c8e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,20 @@ +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/mail-display.c b/mail/mail-display.c index f9dc8580dd..ec774e71c1 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 (header_content_type_is (((CamelDataWrapper *) part)->mime_type, "text", "*")) { + if (camel_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 = header_content_type_simple (((CamelDataWrapper *) part)->mime_type); + drag_types[DND_TARGET_TYPE_PART_MIME_TYPE].target = camel_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 (header_content_type_is (content_type, "text", "*")) { + if (camel_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 = header_decode_date (due_by, &offset); + target_date = camel_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 92428af592..efe889dafe 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 (!header_content_type_is (content_type, "message", "*")) + if (!camel_content_type_is (content_type, "message", "*")) return TRUE; /* Otherwise, display it inline if it's "anonymous", and * as an attachment otherwise. */ - type = header_content_type_simple (content_type); + type = camel_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 = header_decode_date(datestr, &msg_offset); + + msg_date = camel_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 _header_raw *header; + struct _camel_header_raw *header; const char *charset; CamelContentType *ct; char *value; ct = camel_mime_part_get_content_type (CAMEL_MIME_PART (message)); - charset = header_content_type_param (ct, "charset"); + charset = camel_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 = header_decode_string (header->value, charset); + value = camel_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 *) header_content_type_param (content_type, "charset"))) { + } else if (content_type && (charset = (char *) camel_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 (header_content_type_is (type, "text", "plain")) { - format = header_content_type_param (type, "format"); + if (camel_content_type_is (type, "text", "plain")) { + format = camel_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 = header_content_type_param (((CamelDataWrapper *) part)->mime_type, "protocol"); + protocol = camel_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 = header_content_type_param (content_type, "start"); + start = camel_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 = header_content_type_simple (type); + char *mime_type = camel_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 = header_content_type_param (type, "access-type"); + access_type = camel_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 = header_content_type_param (type, "name"); - site = header_content_type_param (type, "site"); + name = camel_content_type_param (type, "name"); + site = camel_content_type_param (type, "site"); if (name == NULL || site == NULL) goto fallback; - dir = header_content_type_param (type, "directory"); - mode = header_content_type_param (type, "mode"); + dir = camel_content_type_param (type, "directory"); + mode = camel_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 = header_content_type_param (type, "name"); + name = camel_content_type_param (type, "name"); if (name == NULL) goto fallback; - site = header_content_type_param (type, "site"); + site = camel_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 = header_content_type_param (type, "url"); + urlparam = camel_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 = header_format_date (date_val, offset); + buf = camel_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 (header_content_type_is (mime_type, "message", "rfc822") || - header_content_type_is (mime_type, "message", "news")) + if (camel_content_type_is (mime_type, "message", "rfc822") || + camel_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 (header_content_type_is (mime_type, "text", "x-vcard") || - header_content_type_is (mime_type, "text", "calendar")) + if (camel_content_type_is (mime_type, "text", "x-vcard") || + camel_content_type_is (mime_type, "text", "calendar")) return NULL; /* Get the body data for other text/ or message/ types */ - if (header_content_type_is (mime_type, "text", "*") || - header_content_type_is (mime_type, "message", "*")) { + if (camel_content_type_is (mime_type, "text", "*") || + camel_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 && !header_content_type_is(mime_type, "text", "html")) { + if (text && !camel_content_type_is(mime_type, "text", "html")) { char *html; - if (header_content_type_is(mime_type, "text", "richtext")) + if (camel_content_type_is(mime_type, "text", "richtext")) html = camel_enriched_to_html(text, CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT); - else if (header_content_type_is(mime_type, "text", "enriched")) + else if (camel_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 (!header_content_type_is (mime_type, "multipart", "*")) + if (!camel_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 (header_content_type_is (mime_type, "multipart", "alternative")) { + } else if (camel_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 489dda4402..397df4c418 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 (header_content_type_is (type, "text", "*")) + if (camel_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 (header_content_type_is (content_type, "text", "*") - && (charset = header_content_type_param (content_type, "charset")) + if (camel_content_type_is (content_type, "text", "*") + && (charset = camel_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 77e03b656e..93722e6d87 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 = header_decode_date (tag, NULL); + due_by = camel_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 = header_decode_date (due_by, NULL); + target_date = camel_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 6c8472bad5..6a2f62eaf6 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 = header_format_date (date, 0); + text = camel_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 = header_format_date (followup->completed_date, 0); + text = camel_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 = header_decode_date (text, NULL); + date = camel_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 = header_decode_date (text, NULL); + date = camel_header_decode_date (text, NULL); if (date != (time_t) 0) { gtk_toggle_button_set_active (followup->completed, TRUE); followup->completed_date = date; |