[evolution-patches] 65058, message formatting broken, inline image




Should fix it better, without breaking html pages.

--
Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3444.2.7
diff -u -3 -r1.3444.2.7 ChangeLog
--- mail/ChangeLog	17 Sep 2004 20:13:36 -0000	1.3444.2.7
+++ mail/ChangeLog	20 Sep 2004 09:27:35 -0000
@@ -1,3 +1,11 @@
+2004-09-03  Not Zed  <NotZed Ximian com>
+
+	** See bug #65058.
+
+	* em-format-html.c (efh_image): use the content-id rather than
+	the uri for tracking our image reference.  Makes more
+	sense anyway, its guaranteed unique.
+
 2004-09-09  Jeffrey Stedfast  <fejj novell com>
 
 	* em-message-browser.c (emmb_set_message): Ignore the
Index: mail/em-format-html-display.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-format-html-display.c,v
retrieving revision 1.50
diff -u -3 -r1.50 em-format-html-display.c
--- mail/em-format-html-display.c	23 Aug 2004 15:27:10 -0000	1.50
+++ mail/em-format-html-display.c	20 Sep 2004 09:27:37 -0000
@@ -959,7 +959,7 @@
 	CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)puri->part);
 
 	/* TODO: identical to efh_write_image */
-	d(printf("writing image '%s'\n", puri->uri?puri->uri:puri->cid));
+	d(printf("writing image '%s'\n", puri->cid));
 	camel_data_wrapper_decode_to_stream(dw, stream);
 	camel_stream_close(stream);
 }
Index: mail/em-format-html.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-format-html.c,v
retrieving revision 1.63
diff -u -3 -r1.63 em-format-html.c
--- mail/em-format-html.c	12 Aug 2004 16:34:22 -0000	1.63
+++ mail/em-format-html.c	20 Sep 2004 09:27:37 -0000
@@ -1087,7 +1087,7 @@
 {
 	CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)puri->part);
 
-	d(printf("writing image '%s'\n", puri->uri?puri->uri:puri->cid));
+	d(printf("writing image '%s'\n", puri->cid));
 	camel_data_wrapper_decode_to_stream(dw, stream);
 	camel_stream_close(stream);
 }
@@ -1096,12 +1096,10 @@
 efh_image(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
 {
 	EMFormatPURI *puri;
-	const char *location;
 
 	puri = em_format_add_puri((EMFormat *)efh, sizeof(EMFormatPURI), NULL, part, efh_write_image);
-	location = puri->uri?puri->uri:puri->cid;
-	d(printf("adding image '%s'\n", location));
-	camel_stream_printf(stream, "<img hspace=10 vspace=10 src=\"%s\">", location);
+	d(printf("adding image '%s'\n", puri->cid));
+	camel_stream_printf(stream, "<img hspace=10 vspace=10 src=\"%s\">", puri->cid);
 }
 
 static EMFormatHandler type_builtin_table[] = {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]