Index: mail/ChangeLog
===================================================================
--- mail/ChangeLog	(revision 33831)
+++ mail/ChangeLog	(working copy)
@@ -1,3 +1,17 @@
+2007-07-23  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #273386
+
+	* em-format-html.c: (efh_format_timeout):
+	Clear preview and show text "Formatting message" at the beginning.
+
+	* em-format-html-display.c: (efhd_attachment_show):
+	Changed debug output to print also pointer address.
+	* em-format.c: (emf_clear_puri_node):
+	Added debug output to see which memory is going to be freed.
+	* em-format-html.c: (efh_url_requested), (efh_format_headers):
+	Warnings cleanup.
+
 2007-07-17  Sankar P  <psankar@novell.com>
 
 	* em-format-html.c: (efh_format_headers):
Index: mail/em-format.c
===================================================================
--- mail/em-format.c	(revision 33831)
+++ mail/em-format.c	(working copy)
@@ -489,6 +489,7 @@
 		pw = (EMFormatPURI *)node->uri_list.head;
 		pn = pw->next;
 		while (pn) {
+			d(printf ("freeing pw %p format:%p\n", pw, pw->format));
 			if (pw->free)
 				pw->free(pw);
 			g_free(pw->uri);
Index: mail/em-format-html-display.c
===================================================================
--- mail/em-format-html-display.c	(revision 33831)
+++ mail/em-format-html-display.c	(working copy)
@@ -121,7 +121,7 @@
 #define localtime_r(tp,tmp) (localtime(tp)?(*(tmp)=*localtime(tp),(tmp)):0)
 #endif
 
-#define d(x)
+#define d(x) 
 
 #define EFHD_TABLE_OPEN "<table>"
 
@@ -1421,7 +1421,7 @@
 {
 	struct _attach_puri *info = data;
 
-	d(printf("show attachment button called\n"));
+	d(printf("show attachment button called %p\n", info));
 
 	info->shown = ~info->shown;
 	em_format_set_inline(info->puri.format, info->puri.part_id, info->shown);
Index: mail/em-format-html.c
===================================================================
--- mail/em-format-html.c	(revision 33831)
+++ mail/em-format-html.c	(working copy)
@@ -579,7 +579,7 @@
 		job = em_format_html_job_new(efh, emfh_gethttp, g_strdup(url));
 	} else if  (g_ascii_strncasecmp(url, "/", 1) == 0) {
 		char *data = NULL;
-		guint length = 0;
+		gsize length = 0;
 		gboolean status;
 		
 		status = g_file_get_contents (url, &data, &length, NULL);
@@ -1371,6 +1371,11 @@
 		mail_msg_free(m);
 		p->last_part = NULL;
 	} else {
+		hstream = gtk_html_begin(efh->html);
+		gtk_html_stream_printf(hstream, "<h5>%s</h5>",
+						_("Formatting Message..."));
+		gtk_html_stream_close(hstream, GTK_HTML_STREAM_OK);
+
 		hstream = NULL;
 		m->estream = (EMHTMLStream *)em_html_stream_new(efh->html, hstream);
 
@@ -1765,8 +1770,8 @@
 	const char *photo_name = NULL;
 	CamelInternetAddress *cia = NULL;
 	gboolean face_decoded  = FALSE;
-	char *face_header_value;
-	int face_header_len;
+	char *face_header_value = NULL;
+	int face_header_len = 0;
 	
 	ct = camel_mime_part_get_content_type((CamelMimePart *)part);
 	charset = camel_content_type_param (ct, "charset");
