aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2003-08-27 02:17:59 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-08-27 02:17:59 +0800
commita09cef605f4fc1bfbfbb4d23d32106f710debc95 (patch)
tree29094be868b06499a1020d59f891fcca435fd966 /mail
parent04b9ec51d45f2efb3b8118eef99c7592ba269792 (diff)
downloadgsoc2013-evolution-a09cef605f4fc1bfbfbb4d23d32106f710debc95.tar.gz
gsoc2013-evolution-a09cef605f4fc1bfbfbb4d23d32106f710debc95.tar.zst
gsoc2013-evolution-a09cef605f4fc1bfbfbb4d23d32106f710debc95.zip
temporarily reverting camel namespace changes until after other branches have been merged
svn path=/trunk/; revision=22374
Diffstat (limited to 'mail')
-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
11 files changed, 51 insertions, 80 deletions
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;