From 5329b4e700ccbe92c508f6324a94a6bf9d35bd21 Mon Sep 17 00:00:00 2001 From: bertrand Date: Fri, 3 Mar 2000 19:42:47 +0000 Subject: [PATCH] in the case of images, put the content object output stream in the url. 2000-03-03 bertrand * camel-formatter.c (handle_image): in the case of images, put the content object output stream in the url. This allows the message browser to show inline images. --- camel/ChangeLog | 5 +++++ camel/camel-formatter.c | 12 ++++++------ camel/providers/mbox/camel-mbox-folder.c | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 45cf9db..d781b19 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,10 @@ 2000-03-03 bertrand + * camel-formatter.c (handle_image): in the case + of images, put the content object output stream + in the url. This allows the message browser + to show inline images. + * camel-stream-b64.c (my_read_encode): fixed state 0 keep value. diff --git a/camel/camel-formatter.c b/camel/camel-formatter.c index 469a096..1754d85 100644 --- a/camel/camel-formatter.c +++ b/camel/camel-formatter.c @@ -305,7 +305,7 @@ call_handler_function (CamelFormatter* formatter, */ if (mimetype_whole_in) { mimetype_whole = str_tolower (mimetype_whole_in); - + handler_function = g_hash_table_lookup ( mime_function_table, mimetype_whole); } @@ -719,12 +719,12 @@ handle_image (CamelFormatter *formatter, CamelDataWrapper *wrapper) uuid = lookup_unique_id (formatter->priv->current_root, wrapper); - tag = g_strdup_printf ("\n", uuid); + tag = g_strdup_printf ("\n", uuid); camel_stream_write_string (formatter->priv->stream, tag); - + debug ("handle_image: tag=%s\n", tag); g_free (uuid); g_free (tag); - + debug ("handle_image: exiting\n"); } @@ -991,8 +991,8 @@ camel_formatter_class_init (CamelFormatterClass *camel_formatter_class) ADD_HANDLER ("multipart/related", handle_multipart_related); ADD_HANDLER ("multipart/mixed", handle_multipart_mixed); ADD_HANDLER ("message/rfc822", handle_mime_part); - ADD_HANDLER ("image/", handle_image); - ADD_HANDLER ("vcard/", handle_vcard); + ADD_HANDLER ("image", handle_image); + ADD_HANDLER ("vcard", handle_vcard); /* body parts don't have mime parts per se, so camel sticks on the following one */ diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c index d188cf7..5b37bee 100644 --- a/camel/providers/mbox/camel-mbox-folder.c +++ b/camel/providers/mbox/camel-mbox-folder.c @@ -860,7 +860,6 @@ static void _append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex) { CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER(folder); - //guint new_msg_number; CamelStream *output_stream; guint32 tmp_file_size; guint32 next_uid; @@ -873,6 +872,7 @@ _append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxFolder::append_message\n"); tmp_message_filename = g_strdup_printf ("%s.tmp", mbox_folder->folder_file_path); + /* write the message itself */ output_stream = camel_stream_fs_new_with_name (tmp_message_filename, CAMEL_STREAM_FS_WRITE); if (output_stream != NULL) { -- 2.7.4