Index: message-list.h
===================================================================
--- message-list.h	(révision 33519)
+++ message-list.h	(copie de travail)
@@ -218,6 +218,7 @@
 void           message_list_set_threaded_expand_all (MessageList *ml);
 void           message_list_set_threaded_collapse_all (MessageList *ml);
 
+void           message_list_set_expand_all (MessageList *ml, gboolean threaded);
 void	       message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted);
 void	       message_list_set_search (MessageList *ml, const char *search);
 
Index: mail-signature-editor.c
===================================================================
--- mail-signature-editor.c	(révision 33519)
+++ mail-signature-editor.c	(copie de travail)
@@ -108,7 +108,7 @@
 	stream_mem = BONOBO_STREAM_MEM (stream);
 	
 	text = g_byte_array_new ();
-	g_byte_array_append (text, stream_mem->buffer, stream_mem->pos);
+	g_byte_array_append (text, (unsigned char *)stream_mem->buffer, stream_mem->pos);
 	bonobo_object_unref (BONOBO_OBJECT (stream));
 	
 	return text;
@@ -172,7 +172,7 @@
 		goto exception;
 	}
 
-	if (write_all (fd, text->data, text->len) == -1) {
+	if (write_all (fd, (char *)text->data, text->len) == -1) {
 		g_byte_array_free (text, TRUE);
 		close (fd);
 		goto exception;
Index: em-icon-stream.c
===================================================================
--- em-icon-stream.c	(révision 33519)
+++ em-icon-stream.c	(copie de travail)
@@ -143,7 +143,7 @@
 	if (emis->loader == NULL)
 		return -1;
 
-	if (!gdk_pixbuf_loader_write(emis->loader, buffer, n, NULL)) {
+	if (!gdk_pixbuf_loader_write(emis->loader, (const unsigned char *)buffer, n, NULL)) {
 		emis_cleanup(emis);
 		return -1;
 	}
Index: mail-tools.c
===================================================================
--- mail-tools.c	(révision 33519)
+++ mail-tools.c	(copie de travail)
@@ -110,7 +110,7 @@
 	char *path, *full;
 	struct stat st;
 
-	safe_uri = g_strdup (uri);
+	safe_uri = (unsigned char *)g_strdup ((const gchar *)uri);
 	for (c = safe_uri; *c; c++)
 		if (strchr("/:;=|%&#!*^()\\, ", *c) || !isprint((int) *c))
 			*c = '_';
@@ -154,7 +154,7 @@
 	}
 	
 	/* Set up our destination. */
-	dest_path = mail_tool_get_local_movemail_path (source_url, ex);
+	dest_path = mail_tool_get_local_movemail_path ((unsigned char *)source_url, ex);
 	if (dest_path == NULL)
 		return NULL;
 
Index: em-folder-browser.c
===================================================================
--- em-folder-browser.c	(révision 33519)
+++ em-folder-browser.c	(copie de travail)
@@ -751,7 +751,7 @@
 			if (input)
 				filter_input_set_value(input, query);
 			
-			words = camel_search_words_split(query);
+			words = camel_search_words_split((unsigned char *)query);
 			for (i=0;i<words->len;i++)
 				strings = g_slist_prepend(strings, g_strdup(words->words[i]->word));
 			camel_search_words_free (words);
@@ -1360,7 +1360,7 @@
 emfb_folder_refresh(BonoboUIComponent *uid, void *data, const char *path)
 {
         EMFolderBrowser *emfb = data;
-	EMFolderTree *tree = g_object_get_data (emfb, "foldertree");
+	EMFolderTree *tree = g_object_get_data (G_OBJECT (emfb), "foldertree");
         CamelFolder *folder;
 
         if ((folder = em_folder_tree_get_selected_folder (tree)) != NULL)
Index: em-vfolder-rule.c
===================================================================
--- em-vfolder-rule.c	(révision 33519)
+++ em-vfolder-rule.c	(copie de travail)
@@ -259,13 +259,13 @@
         node = FILTER_RULE_CLASS(parent_class)->xml_encode(fr);
 	g_assert(node != NULL);
 	g_assert(vr->with >= 0 && vr->with < sizeof(with_names)/sizeof(with_names[0]));
-	set = xmlNewNode(NULL, "sources");
+	set = xmlNewNode(NULL, (const unsigned char *)"sources");
 	xmlAddChild(node, set);
-	xmlSetProp(set, "with", with_names[vr->with]);
+	xmlSetProp(set, (const unsigned char *)"with", (unsigned char *)with_names[vr->with]);
 	l = vr->sources;
 	while (l) {
-		work = xmlNewNode(NULL, "folder");
-		xmlSetProp(work, "uri", l->data);
+		work = xmlNewNode(NULL, (const unsigned char *)"folder");
+		xmlSetProp(work, (const unsigned char *)"uri", (unsigned char *)l->data);
 		xmlAddChild(set, work);
 		l = l->next;
 	}
@@ -309,16 +309,16 @@
 
 	set = node->children;
 	while (set) {
-		if (!strcmp(set->name, "sources")) {
-			tmp = xmlGetProp(set, "with");
+		if (!strcmp((char *)set->name, "sources")) {
+			tmp = (char *)xmlGetProp(set, (const unsigned char *)"with");
 			if (tmp) {
 				set_with(vr, tmp);
 				xmlFree(tmp);
 			}
 			work = set->children;
 			while (work) {
-				if (!strcmp(work->name, "folder")) {
-					tmp = xmlGetProp(work, "uri");
+				if (!strcmp((char *)work->name, "folder")) {
+					tmp = (char *)xmlGetProp(work, (const unsigned char *)"uri");
 					if (tmp) {
 						vr->sources = g_list_append(vr->sources, g_strdup(tmp));
 						xmlFree(tmp);
@@ -413,7 +413,7 @@
 static void
 select_source_with_changed(GtkWidget *widget, struct _source_data *data)
 {
-	em_vfolder_rule_with_t with;
+	em_vfolder_rule_with_t with = 0;
 	GSList *group = NULL;
 	gint i = 0;	
 
Index: em-format-quote.c
===================================================================
--- em-format-quote.c	(révision 33519)
+++ em-format-quote.c	(copie de travail)
@@ -56,7 +56,7 @@
 
 static void
 emfq_init(GObject *o)
-{
+{ 
 	EMFormatQuote *emfq =(EMFormatQuote *) o;
 	
 	emfq->priv = g_malloc0(sizeof(*emfq->priv));
@@ -220,7 +220,7 @@
 				
 				g_string_append_printf (out, "%s &lt;", name);
 				/* rfc2368 for mailto syntax and url encoding extras */
-				if ((real = camel_header_encode_phrase (a->name))) {
+				if ((real = camel_header_encode_phrase ((unsigned char *)a->name))) {
 					mailaddr = g_strdup_printf ("%s <%s>", real, a->v.addr);
 					g_free (real);
 					mailto = camel_url_encode (mailaddr, "?=&()");
@@ -410,7 +410,7 @@
 	camel_stream_filter_add(filtered_stream, html_filter);
 	camel_object_unref(html_filter);
 	
-	em_format_format_text(emf, (CamelStream *)filtered_stream, part);
+	em_format_format_text(emf, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
 	camel_object_unref(filtered_stream);
 }
 
@@ -472,7 +472,7 @@
 	camel_stream_filter_add(filtered_stream, html_filter);
 	camel_object_unref(html_filter);
 	
-	em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, part);
+	em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
 	camel_stream_flush((CamelStream *)filtered_stream);
 	camel_object_unref(filtered_stream);
 }
@@ -500,7 +500,7 @@
 	camel_object_unref(enriched);
 
 	camel_stream_write_string(stream, "<br><hr><br>");
-	em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, part);
+	em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
 	camel_object_unref(filtered_stream);
 }
 
@@ -508,7 +508,7 @@
 emfq_text_html(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
 {
 	camel_stream_write_string(stream, "\n<!-- text/html -->\n");
-	em_format_format_text(emf, stream, part);
+	em_format_format_text(emf, stream, (CamelDataWrapper *)part);
 }
 
 static void
Index: em-composer-utils.c
===================================================================
--- em-composer-utils.c	(révision 33519)
+++ em-composer-utils.c	(copie de travail)
@@ -371,7 +371,7 @@
 		if (account->id->organization && *account->id->organization) {
 			char *org;
 			
-			org = camel_header_encode_string (account->id->organization);
+			org = camel_header_encode_string ((const unsigned char *)account->id->organization);
 			camel_medium_set_header (CAMEL_MEDIUM (message), "Organization", org);
 			g_free (org);
 		}
Index: em-format.c
===================================================================
--- em-format.c	(révision 33519)
+++ em-format.c	(copie de travail)
@@ -1019,7 +1019,7 @@
 	CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
 
 	if (camel_content_type_is (dw->mime_type, "text", "*"))
-		em_format_format_text(emf, stream, part);
+		em_format_format_text(emf, stream, (CamelDataWrapper *)part);
 	else
 		camel_data_wrapper_decode_to_stream(dw, stream);
 }
@@ -1071,7 +1071,7 @@
 		charset = emf->default_charset;
 	}
 
-	mem_stream = (CamelStreamMem *)camel_stream_mem_new ();
+	mem_stream = (CamelStream *)camel_stream_mem_new ();
 	filter_stream = camel_stream_filter_new_with_stream(mem_stream);
 	
 	if ((filter = camel_mime_filter_charset_new_convert(charset, "UTF-8"))) {
@@ -1224,7 +1224,7 @@
 emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
 {
 	CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
-	int i, nparts, bestid;
+	int i, nparts, bestid = 0;
 	CamelMimePart *best = NULL;
 
 	if (!CAMEL_IS_MULTIPART(mp)) {
@@ -1514,7 +1514,7 @@
 static void
 emf_message_deliverystatus(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
 {
-	em_format_format_text(emf, stream, part);
+	em_format_format_text(emf, stream, (CamelDataWrapper *)part);
 }
 
 static void
Index: em-format-html-display.c
===================================================================
--- em-format-html-display.c	(révision 33519)
+++ em-format-html-display.c	(copie de travail)
@@ -679,22 +679,22 @@
 //	gtk_box_pack_start ((GtkBox *)(hbox2), p->search_entry_box, TRUE, TRUE, 5);
 
 	button3 = gtk_button_new_with_mnemonic (_("_Previous"));
-	gtk_button_set_image (button3, gtk_image_new_from_stock(GTK_STOCK_GO_BACK, GTK_ICON_SIZE_BUTTON));
+	gtk_button_set_image (GTK_BUTTON (button3), GTK_WIDGET(gtk_image_new_from_stock(GTK_STOCK_GO_BACK, GTK_ICON_SIZE_BUTTON)));
 	gtk_widget_show (button3);
-	gtk_box_pack_start ((GtkBox *)(hbox2), button3, FALSE, FALSE, 5);
+	gtk_box_pack_start (GTK_BOX (hbox2), button3, FALSE, FALSE, 5);
 
 	button2 = gtk_button_new_with_mnemonic (_("_Next"));
 	gtk_button_set_image (GTK_BUTTON (button2), gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON));
 	gtk_widget_show (button2);
-	gtk_box_pack_start ((GtkBox *)(hbox2), button2, FALSE, FALSE, 5);
+	gtk_box_pack_start (GTK_BOX (hbox2), button2, FALSE, FALSE, 5);
 
 	p->search_case_check = gtk_check_button_new_with_mnemonic (_("M_atch case"));
 	gtk_widget_show (p->search_case_check);
-	gtk_box_pack_start ((GtkBox *)(hbox2), p->search_case_check, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (hbox2), p->search_case_check, FALSE, FALSE, 0);
 
 	p->search_matches_label = gtk_label_new ("");
 	gtk_widget_show (p->search_matches_label);
-	gtk_box_pack_start ((GtkBox *)(hbox2), p->search_matches_label, TRUE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (hbox2), p->search_matches_label, TRUE, TRUE, 0);
 	p->search_dialog = GTK_HBOX (hbox2);
 	
 	p->search_wrap = FALSE;
@@ -895,12 +895,13 @@
 				((EMFormatHTML *) efhd)->header_wrap_flags |= EM_FORMAT_HTML_HEADER_CC;
 			else
 				((EMFormatHTML *) efhd)->header_wrap_flags &= ~EM_FORMAT_HTML_HEADER_CC;
-		else if (!strcmp (url, "##BCC##"))
+		else if (!strcmp (url, "##BCC##")) {
 			if (!(((EMFormatHTML *) efhd)->header_wrap_flags & EM_FORMAT_HTML_HEADER_BCC))
 				((EMFormatHTML *) efhd)->header_wrap_flags |= EM_FORMAT_HTML_HEADER_BCC;
 			else
 				((EMFormatHTML *) efhd)->header_wrap_flags &= ~EM_FORMAT_HTML_HEADER_BCC;
-		em_format_redraw((EMFormat *)efhd);     
+		}
+		em_format_redraw((EMFormat *)efhd);
 	} else
 	    g_signal_emit((GObject *)efhd, efhd_signals[EFHD_LINK_CLICKED], 0, url);
 }
@@ -1573,7 +1574,7 @@
 		/* Kludge around Nautilus requesting the same data many times */
 		uri = g_object_get_data((GObject *)w, "e-drag-uri");
 		if (uri) {
-			gtk_selection_data_set(data, data->target, 8, uri, strlen(uri));
+			gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri, strlen(uri));
 			return;
 		}
 
@@ -1585,7 +1586,7 @@
 		g_free(path);
 		uri_crlf = g_strconcat(uri, "\r\n", NULL);
 		g_free(uri);
-		gtk_selection_data_set(data, data->target, 8, uri_crlf, strlen(uri_crlf));
+		gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri_crlf, strlen(uri_crlf));
 		g_object_set_data_full((GObject *)w, "e-drag-uri", uri_crlf, g_free);
 		break;
 	default:
@@ -1999,7 +2000,7 @@
 	}
 	
 	/* ...convert the CamelStreamMem to a BonoboStreamMem... */
-	bstream = bonobo_stream_mem_create(cstream->buffer->data, cstream->buffer->len, TRUE, FALSE);
+	bstream = bonobo_stream_mem_create((char *)cstream->buffer->data, cstream->buffer->len, TRUE, FALSE);
 	camel_object_unref(cstream);
 	
 	/* ...and hydrate the PersistStream from the BonoboStream. */
@@ -2440,13 +2441,13 @@
 static void 
 efhd_optional_button_show (GtkWidget *widget, GtkWidget *w)
 {
-	GtkWidget *label = g_object_get_data (widget, "text-label");
+	GtkWidget *label = g_object_get_data (G_OBJECT (widget), "text-label");
 	
 	if (GTK_WIDGET_VISIBLE (w)) {
 		gtk_widget_hide (w);
-		gtk_label_set_text_with_mnemonic (label, _("View _Unformatted"));
+		gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("View _Unformatted"));
 	} else {
-		gtk_label_set_text_with_mnemonic (label, _("Hide _Unformatted"));		
+		gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("Hide _Unformatted"));		
 		gtk_widget_show (w);
 	}
 }
@@ -2481,11 +2482,11 @@
 	hbox = gtk_hbox_new (FALSE, 0);
 	img = e_icon_factory_get_image ("stock_show-all", E_ICON_SIZE_BUTTON);
 	label = gtk_label_new_with_mnemonic(_("View _Unformatted"));
-	g_object_set_data (button, "text-label", (gpointer)label);
+	g_object_set_data (G_OBJECT (button), "text-label", (gpointer)label);
 	gtk_box_pack_start ((GtkBox *)hbox, img, TRUE, TRUE, 2);
 	gtk_box_pack_start ((GtkBox *)hbox, label, TRUE, TRUE, 2);
 	gtk_widget_show_all (hbox);
-	gtk_container_add (button, hbox);
+	gtk_container_add (GTK_CONTAINER (button), GTK_WIDGET (hbox));
 	if (info->handle)
 		g_signal_connect(button, "clicked", G_CALLBACK(efhd_optional_button_show), scroll);
 	else {
@@ -2504,7 +2505,7 @@
 	gtk_box_pack_start ((GtkBox *)hbox, label, TRUE, TRUE, 2);
 	gtk_box_pack_start ((GtkBox *)hbox, gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE), TRUE, TRUE, 2);
 	gtk_widget_show_all (hbox);
-	gtk_container_add (button, hbox);
+	gtk_container_add (GTK_CONTAINER (button), GTK_WIDGET (hbox));
 	
 	a11y = gtk_widget_get_accessible (button);
 	atk_object_set_name (a11y, _("Attachment"));
@@ -2518,18 +2519,20 @@
 
 	gtk_box_pack_start((GtkBox *)vbox, mainbox, FALSE, FALSE, 6);
 
-	view = gtk_text_view_new ();
+	view = (GtkTextView *)gtk_text_view_new ();
 	gtk_text_view_set_editable (view, FALSE);
 	gtk_text_view_set_cursor_visible (view, FALSE);
 	buffer = gtk_text_view_get_buffer(view);
-	gtk_text_buffer_set_text (buffer, info->mstream->buffer->data, info->mstream->buffer->len);
+	gtk_text_buffer_set_text (buffer, (char *)info->mstream->buffer->data, info->mstream->buffer->len);
 	camel_object_unref(info->mstream);
 	info->mstream = NULL;
-	gtk_scrolled_window_set_policy (scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
+					GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
-	gtk_container_add (scroll, view);
+	gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (view));
 	gtk_box_pack_start((GtkBox *)vbox, scroll, TRUE, TRUE, 6);
-	gtk_widget_show (view);
+	gtk_widget_show (GTK_WIDGET(view));
+
 	gtk_widget_set_size_request (scroll, ((GtkWidget *)efh->html)->allocation.width-48, 250);
 	g_signal_connect (scroll, "size_allocate", G_CALLBACK(efhd_resize), efh);
 	gtk_widget_show (scroll);
@@ -2558,7 +2561,7 @@
 	info->shown = FALSE;
 	info->snoop_mime_type = g_strdup("text/plain");
 	info->attachment = e_attachment_new_from_mime_part (info->puri.part);
-	info->mstream = mstream;
+	info->mstream = (CamelStreamMem *)mstream;
 	if (emf->valid) {
 		info->sign = emf->valid->sign.status;
 		info->encrypt = emf->valid->encrypt.status;
Index: em-inline-filter.c
===================================================================
--- em-inline-filter.c	(révision 33519)
+++ em-inline-filter.c	(copie de travail)
@@ -135,7 +135,7 @@
 	else
 		encoding = emif_types[emif->state].encoding;
 
-	g_byte_array_append(emif->data, data, len);
+	g_byte_array_append(emif->data, (unsigned char *)data, len);
 	/* check the part will actually have content */
 	if (emif->data->len <= 0) {
 		return;
@@ -327,7 +327,7 @@
 	if (final) {
 		emif_add_part(emif, data_start, inend-data_start);
 	} else {
-		g_byte_array_append(emif->data, data_start, inend-data_start);
+		g_byte_array_append(emif->data, (unsigned char *)data_start, inend-data_start);
 	}
 
 	return 0;
Index: em-folder-view.c
===================================================================
--- em-folder-view.c	(révision 33519)
+++ em-folder-view.c	(copie de travail)
@@ -718,7 +718,7 @@
 	if (p->selection_uri == NULL)
 		return;
 
-	gtk_selection_data_set(data, data->target, 8, p->selection_uri, strlen(p->selection_uri));
+	gtk_selection_data_set(data, data->target, 8, (unsigned char *)p->selection_uri, strlen(p->selection_uri));
 }
 
 static void
@@ -959,7 +959,7 @@
 
 	for (count=0; count < uids->len; count++) {
 		if (camel_folder_get_message_flags (emfv->folder, uids->pdata[count]) & CAMEL_MESSAGE_USER_NOT_DELETABLE) {
-			if ((EMFormatHTML *)emfv->preview_active) {
+			if (emfv->preview_active) {
 				GtkHTMLStream *hstream = gtk_html_begin(((EMFormatHTML *)emfv->preview)->html);
 
 				gtk_html_stream_printf(hstream, "<h2>%s</h2><p>%s</p>",
@@ -1496,7 +1496,7 @@
 emfv_message_reply(EMFolderView *emfv, int mode)
 {
 	char *html;
-	guint len;
+	gint len;
 	
 	if (emfv->list->cursor_uid == NULL)
 		return;
@@ -2893,7 +2897,7 @@
 			camel_url_free(curl);
 			camel_object_unref(cia);
 		} else if (!strncmp (url, "##", 2)) {
-			nice_url = g_strdup_printf (_("Click to hide/unhide addresses"), url);
+			nice_url = _("Click to hide/unhide addresses");
 		} else
 			nice_url = g_strdup_printf (_("Click to open %s"), url);
 	}
Index: em-utils.c
===================================================================
--- em-utils.c	(révision 33519)
+++ em-utils.c	(copie de travail)
@@ -943,7 +943,7 @@
 
 	/* TODO: a stream mem with read-only access to existing data? */
 	/* NB: Although copying would let us run this async ... which it should */
-	stream = camel_stream_mem_new_with_buffer(data->data, data->length);
+	stream = (CamelStream *)camel_stream_mem_new_with_buffer((char *)data->data, data->length);
 	em_utils_read_messages_from_stream(folder, stream);
 	camel_object_unref(stream);
 }
@@ -966,7 +966,7 @@
 		return;
 
 	ex = camel_exception_new();
-	stream = camel_stream_mem_new_with_buffer(data->data, data->length);
+	stream = (CamelStream *)camel_stream_mem_new_with_buffer((char *)data->data, data->length);
 	msg = camel_mime_message_new();
 	if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg, stream) == 0)
 		camel_folder_append_message(folder, msg, NULL, NULL, ex);
@@ -993,7 +993,7 @@
 
 	/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn\0" */
 	
-	g_byte_array_append(array, uri, strlen(uri)+1);
+	g_byte_array_append(array, (unsigned char *)uri, strlen(uri)+1);
 
 	for (i=0; i<uids->len; i++)
 		g_byte_array_append(array, uids->pdata[i], strlen(uids->pdata[i])+1);
@@ -1024,8 +1024,8 @@
 	
 	uids = g_ptr_array_new();
 
-	inptr = data->data;
-	inend = data->data + data->length;
+	inptr = (char *)data->data;
+	inend = (char *)(data->data + data->length);
 	while (inptr < inend) {
 		char *start = inptr;
 
@@ -1043,7 +1043,7 @@
 		return;
 	}
 
-	folder = mail_tool_uri_to_folder(data->data, 0, ex);
+	folder = mail_tool_uri_to_folder((char *)data->data, 0, ex);
 	if (folder) {
 		camel_folder_transfer_messages_to(folder, uids, dest, NULL, move, ex);
 		camel_object_unref(folder);
@@ -1110,7 +1110,7 @@
 			/* terminate with \r\n to be compliant with the spec */
 			char *uri_crlf = g_strconcat(uri, "\r\n", NULL);
 
-			gtk_selection_data_set(data, data->target, 8, uri_crlf, strlen(uri_crlf));
+			gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri_crlf, strlen(uri_crlf));
 			g_free(uri_crlf);
 		}
 
@@ -1139,7 +1139,7 @@
 
 	d(printf(" * drop uri list\n"));
 
-	tmp = g_strndup(data->data, data->length);
+	tmp = g_strndup((char *)data->data, data->length);
 	uris = g_strsplit(tmp, "\n", 0);
 	g_free(tmp);
 	for (i=0;res == 0 && uris[i];i++) {
@@ -1489,7 +1489,7 @@
 	camel_stream_write((CamelStream *) mem, "", 1);
 	camel_object_unref(mem);
 
-	text = buf->data;
+	text = (char *)buf->data;
 	if (len)
 		*len = buf->len-1;
 	g_byte_array_free (buf, FALSE);
@@ -1544,7 +1544,7 @@
 	camel_stream_write((CamelStream *)mem, "", 1);
 	camel_object_unref(mem);
 
-	text = buf->data;
+	text = (char *)buf->data;
 	if (len)
 		*len = buf->len-1;
 	g_byte_array_free(buf, FALSE);
Index: em-utils.h
===================================================================
--- em-utils.h	(révision 33519)
+++ em-utils.h	(copie de travail)
@@ -53,6 +53,7 @@
 gboolean em_utils_check_user_can_send_mail (struct _GtkWidget *parent);
 
 void em_utils_edit_filters (struct _GtkWidget *parent);
+void em_filename_make_safe (gchar *string);
 void em_utils_edit_vfolders (struct _GtkWidget *parent);
 
 void em_utils_save_part(struct _GtkWidget *parent, const char *prompt, struct _CamelMimePart *part);
Index: em-migrate.c
===================================================================
--- em-migrate.c	(révision 33519)
+++ em-migrate.c	(copie de travail)
@@ -118,7 +118,7 @@
 	
 	node = parent->children;
 	while (node != NULL) {
-		if (node->name && !strcmp (node->name, name))
+		if (node->name && !strcmp ((char *)node->name, name))
 			return node;
 		
 		node = node->next;
@@ -136,7 +136,7 @@
 	if (!doc || !(root = xmlDocGetRootElement (doc)))
 		return;
 	
-	if (!root->name || strcmp (root->name, "filteroptions") != 0) {
+	if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) {
 		/* root node is not <filteroptions>, nothing to upgrade */
 		return;
 	}
@@ -148,27 +148,27 @@
 	
 	node = node->children;
 	while (node != NULL) {
-		if (node->name && !strcmp (node->name, "rule")) {
+		if (node->name && !strcmp ((char *)node->name, "rule")) {
 			xmlNodePtr actionset, part, val, n;
 			
 			if ((actionset = xml_find_node (node, "actionset"))) {
 				/* filters.xml */
 				part = actionset->children;
 				while (part != NULL) {
-					if (part->name && !strcmp (part->name, "part")) {
+					if (part->name && !strcmp ((char *)part->name, "part")) {
 						val = part->children;
 						while (val != NULL) {
-							if (val->name && !strcmp (val->name, "value")) {
+							if (val->name && !strcmp ((char *)val->name, "value")) {
 								char *type;
 								
-								type = xmlGetProp (val, "type");
-								if (type && !strcmp (type, "folder")) {
+								type = (char *)xmlGetProp (val, (const unsigned char *)"type");
+								if (type && !strcmp ((char *)type, "folder")) {
 									if ((n = xml_find_node (val, "folder"))) {
-										uri = xmlGetProp (n, "uri");
+										uri = (char *)xmlGetProp (n, (const unsigned char *)"uri");
 										new = upgrade_uri (uri);
 										xmlFree (uri);
 										
-										xmlSetProp (n, "uri", new);
+										xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new);
 										g_free (new);
 									}
 								}
@@ -186,12 +186,12 @@
 				/* vfolders.xml */
 				n = actionset->children;
 				while (n != NULL) {
-					if (n->name && !strcmp (n->name, "folder")) {
-						uri = xmlGetProp (n, "uri");
+					if (n->name && !strcmp ((char *)n->name, "folder")) {
+						uri = (char *)xmlGetProp (n, (const unsigned char *)"uri");
 						new = upgrade_uri (uri);
 						xmlFree (uri);
 						
-						xmlSetProp (n, "uri", new);
+						xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new);
 						g_free (new);
 					}
 					
@@ -324,7 +324,7 @@
 		folder = g_strdup (uri + strlen (base_uri) + 1);
 		
 		/* Add the namespace before the mailbox name, unless the mailbox is INBOX */
-		if (ai->u.imap.namespace && strcmp (folder, "INBOX") != 0)
+		if (ai->u.imap.namespace && strcmp ((char *)folder, "INBOX") != 0)
 			out = g_strdup_printf ("%s/%s/%s", base_uri, ai->u.imap.namespace, folder);
 		else
 			out = g_strdup_printf ("%s/%s", base_uri, folder);
@@ -522,11 +522,11 @@
 			   - this will be picked up later in the conversion */
 			sprintf (key, "transport_url_%d", i);
 			node = e_bconf_get_entry (source, key);
-			if (node && (val = xmlGetProp (node, "value"))) {
+			if (node && (val = (char *)xmlGetProp (node, (const unsigned char *)"value"))) {
 				tmp = e_bconf_hex_decode (val);
 				xmlFree (val);
 				if (strncmp (tmp, "exchanget:", 10) == 0)
-					xmlSetProp (node, "value", rawuri);
+					xmlSetProp (node, (const unsigned char *)"value", (unsigned char *)rawuri);
 				g_free (tmp);
 			} else {
 				d(printf (" couldn't find transport uri?\n"));
@@ -631,17 +631,17 @@
 utf8_reencode (const char *txt)
 {
 	GString *out = g_string_new ("");
-	const unsigned char *p;
+	gchar *p;
 	char *res;
 	
 	/* convert:
         libxml1  8 bit utf8 converted to xml entities byte-by-byte chars -> utf8 */
 	
-	p =  (const unsigned char *) txt;
+	p =  (gchar *)txt;
 	
 	while (*p) {
-		g_string_append_c (out,(char) g_utf8_get_char (p));
-		p = g_utf8_next_char (p);
+		g_string_append_c (out, (gchar)g_utf8_get_char ((const gchar *)p));
+		p = (gchar *)g_utf8_next_char (p);
 	}
 	
 	res = out->str;
@@ -677,18 +677,18 @@
 	/* upgrades the content of a node, if the node has a specific parent/node name */
 	
 	for (i = 0; tags[i].name; i++) {
-		if (!strcmp (node->name, tags[i].name)) {
+		if (!strcmp ((char *)node->name, tags[i].name)) {
 			if (tags[i].tags != NULL) {
 				work = node->children;
 				while (work) {
 					for (j = 0; tags[i].tags[j]; j++) {
-						if (!strcmp (work->name, tags[i].tags[j])) {
-							txt = xmlNodeGetContent (work);
+						if (!strcmp ((char *)work->name, tags[i].tags[j])) {
+							txt = (char *)xmlNodeGetContent (work);
 							if (is_xml1encoded (txt)) {
 								tmp = decode_xml1 (txt);
 								d(printf ("upgrading xml node %s/%s '%s' -> '%s'\n",
 									  tags[i].name, tags[i].tags[j], txt, tmp));
-								xmlNodeSetContent (work, tmp);
+								xmlNodeSetContent (work, (unsigned char *)tmp);
 								g_free (tmp);
 							}
 							xmlFree (txt);
@@ -701,11 +701,11 @@
 			
 			if (tags[i].props != NULL) {
 				for (j = 0; tags[i].props[j]; j++) {
-					txt = xmlGetProp (node, tags[i].props[j]);
+					txt = (char *)xmlGetProp (node, (unsigned char *)tags[i].props[j]);
 					tmp = utf8_reencode (txt);
 					d(printf ("upgrading xml property %s on node %s '%s' -> '%s'\n",
 						  tags[i].props[j], tags[i].name, txt, tmp));
-					xmlSetProp (node, tags[i].props[j], tmp);
+					xmlSetProp (node, (const unsigned char *)tags[i].props[j], (unsigned char *)tmp);
 					g_free (tmp);
 					xmlFree (txt);
 				}
@@ -752,15 +752,15 @@
 		return 0;
 
 	root = priv_doc->children;
-	if (strcmp(root->name, "bonobo-config") != 0) {
+	if (strcmp((char *)root->name, "bonobo-config") != 0) {
 		xmlFreeDoc(priv_doc);
 		return 0;
 	}
 
 	root = root->children;
 	while (root) {
-		if (!strcmp(root->name, "section")) {
-			char *path = xmlGetProp(root, "path");
+		if (!strcmp((char *)root->name, "section")) {
+			char *path = (char *)xmlGetProp(root, (const unsigned char *)"path");
 
 			/* All sections of form
 			   <section path="/Passwords/COMPONENT">
@@ -772,8 +772,9 @@
 			if (path && !strncmp(path, "/Passwords/", 11)) {
 				entry = root->children;
 				while (entry) {
-					if (!strcmp(entry->name, "entry")) {
-						char *namep = xmlGetProp(entry, "name"), *valuep = xmlGetProp(entry, "value");
+					if (!strcmp((char *)entry->name, "entry")) {
+						char *namep = (char *)xmlGetProp(entry, (const unsigned char *)"name"),
+						     *valuep = (char *)xmlGetProp(entry, (const unsigned char *)"value");
 						
 						if (namep && valuep) {
 							char *value = e_bconf_hex_decode(valuep);
@@ -1282,7 +1283,7 @@
 		return FALSE;
 	}
 	
-	if (!node->name || strcmp (node->name, "efolder") != 0) {
+	if (!node->name || strcmp ((char *)node->name, "efolder") != 0) {
 		g_warning ("`%s' corrupt: root node is not 'efolder'", metadata);
 		xmlFreeDoc (doc);
 		return FALSE;
@@ -1290,9 +1291,9 @@
 	
 	node = node->children;
 	while (node != NULL) {
-		if (node->name && !strcmp (node->name, "type")) {
-			type = xmlNodeGetContent (node);
-			if (!strcmp (type, "mail")) {
+		if (node->name && !strcmp ((char *)node->name, "type")) {
+			type = (char *)xmlNodeGetContent (node);
+			if (!strcmp ((char *)type, "mail")) {
 				xmlFreeDoc (doc);
 				xmlFree (type);
 				
@@ -1337,12 +1338,12 @@
 	
 	g_free (buf);
 	
-	if (!(node = xmlDocGetRootElement (doc)) || strcmp (node->name, "expanded_state") != 0) {
+	if (!(node = xmlDocGetRootElement (doc)) || strcmp ((char *)node->name, "expanded_state") != 0) {
 		xmlFreeDoc (doc);
 		return -1;
 	}
 	
-	if (!(buf = xmlGetProp (node, "default"))) {
+	if (!(buf = (char *)xmlGetProp (node, (const unsigned char *)"default"))) {
 		xmlFreeDoc (doc);
 		return -1;
 	}
@@ -1381,24 +1382,24 @@
 		goto nofile;
 
 	node = doc->children;
-	if (strcmp(node->name, "folderinfo"))
+	if (strcmp((char *)node->name, "folderinfo"))
 		goto dodefault;
 	
 	for (node = node->children; node; node = node->next) {
-		if (node->name && !strcmp (node->name, "folder")) {
-			tmp = xmlGetProp (node, "type");
+		if (node->name && !strcmp ((char *)node->name, "folder")) {
+			tmp = (char *)xmlGetProp (node, (const unsigned char *)"type");
 			if (tmp) {
 				protocol = alloca(strlen(tmp)+1);
 				strcpy(protocol, tmp);
 				xmlFree(tmp);
 			}
-			tmp = xmlGetProp (node, "name");
+			tmp = (char *)xmlGetProp (node, (const unsigned char *)"name");
 			if (tmp) {
 				name = alloca(strlen(tmp)+1);
 				strcpy(name, tmp);
 				xmlFree(tmp);
 			}
-			tmp = xmlGetProp (node, "index");
+			tmp = (char *)xmlGetProp (node, (const unsigned char *)"index");
 			if (tmp) {
 				index = atoi(tmp);
 				xmlFree(tmp);
@@ -1939,7 +1940,7 @@
 	if (!doc || !(root = xmlDocGetRootElement (doc)))
 		return;
 	
-	if (!root->name || strcmp (root->name, "filteroptions") != 0) {
+	if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) {
 		/* root node is not <filteroptions>, nothing to upgrade */
 		return;
 	}
@@ -1951,19 +1952,19 @@
 	
 	node = node->children;
 	while (node != NULL) {
-		if (node->name && !strcmp (node->name, "rule")) {
+		if (node->name && !strcmp ((char *)node->name, "rule")) {
 			xmlNodePtr sources;
 			char *src;
 			
-			if (!(src = xmlGetProp (node, "source")))
-				src = xmlStrdup ("local");  /* default to all local folders? */
+			if (!(src = (char *)xmlGetProp (node, (const unsigned char *)"source")))
+				src = (char *)xmlStrdup ((const unsigned char *)"local");  /* default to all local folders? */
 			
-			xmlSetProp (node, "source", "incoming");
+			xmlSetProp (node, (const unsigned char *)"source", (const unsigned char *)"incoming");
 			
 			if (!(sources = xml_find_node (node, "sources")))
-				sources = xmlNewChild (node, NULL, "sources", NULL);
+				sources = xmlNewChild (node, NULL, (const unsigned char *)"sources", NULL);
 			
-			xmlSetProp (sources, "with", src);
+			xmlSetProp (sources, (const unsigned char *)"with", (unsigned char *)src);
 			xmlFree (src);
 		}
 		
@@ -2289,7 +2290,7 @@
 		if (!(ext = strrchr (dent->d_name, '.')))
 			continue;
 		
-		if (!strcmp (ext, ".galview") || !strcmp (dent->d_name, "galview.xml")) {
+		if (!strcmp (ext, ".galview") || !strcmp ((char *)dent->d_name, "galview.xml")) {
 			/* just copy the file */
 			filename = dent->d_name;
 			goto copy;
@@ -2297,9 +2298,9 @@
 			continue;
 		}
 		
-		if (!strncmp (dent->d_name, "current_view-", 13)) {
+		if (!strncmp ((const char *)dent->d_name, "current_view-", 13)) {
 			prelen = 13;
-		} else if (!strncmp (dent->d_name, "custom_view-", 12)) {
+		} else if (!strncmp ((const char *)dent->d_name, "custom_view-", 12)) {
 			prelen = 12;
 		} else {
 			/* huh? wtf is this file? */
@@ -2528,7 +2529,7 @@
 	 * searchtypes.xml file instead */
 
 	node = xmlDocGetRootElement(searches);
-	if (!node->name || strcmp(node->name, "filteroptions"))
+	if (!node->name || strcmp((char *)node->name, "filteroptions"))
 		return;
 
 	if (!(node = xml_find_node(node, "ruleset")))
@@ -2538,11 +2539,11 @@
 	while (node != NULL) {
 		xmlNodePtr nnode = node->next;
 
-		if (node->name && !strcmp (node->name, "rule")) {
+		if (node->name && !strcmp ((char *)node->name, "rule")) {
 			char *src;
 
-			src = xmlGetProp(node, "source");
-			if (src && !strcmp(src, "demand")) {
+			src = (char *)xmlGetProp(node, (unsigned char *)"source");
+			if (src && !strcmp((char *)src, "demand")) {
 				xmlUnlinkNode(node);
 				xmlFreeNodeList(node);
 			}
@@ -2645,7 +2646,7 @@
 {
 	GDir *dir;
 	const char *d;
-	char *local, *base;
+	char *local = NULL, *base;
 	const gchar * const *language_names;
 
 	/* special-case - this means brand new install of evolution */
Index: importers/mail-importer.c
===================================================================
--- importers/mail-importer.c	(révision 33519)
+++ importers/mail-importer.c	(copie de travail)
@@ -235,7 +235,7 @@
 		while (camel_mime_parser_step(mp, 0, 0) == CAMEL_MIME_PARSER_STATE_FROM) {
 			CamelMimeMessage *msg;
 			const char *tmp;
-			int pc;
+			int pc = 0;
 			guint32 flags = 0;
 
 			if (st.st_size > 0)
Index: em-event.c
===================================================================
--- em-event.c	(révision 33519)
+++ em-event.c	(copie de travail)
@@ -153,7 +153,7 @@
 {
 	EMEventTargetComposer *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_COMPOSER, sizeof(*t));
 
-	t->composer = g_object_ref(composer);
+	t->composer = g_object_ref(G_OBJECT(composer));
 	t->target.mask = ~flags;
 
 	return t;
Index: em-junk-hook.c
===================================================================
--- em-junk-hook.c	(révision 33519)
+++ em-junk-hook.c	(copie de travail)
@@ -222,7 +222,7 @@
 	
 	/* We'll processs only  the first item from xml file*/
 	while (node) {
-		if (0 == strcmp(node->name, "item")) {
+		if (0 == strcmp((char *)node->name, "item")) {
 			struct _EMJunkHookItem *item;
 
 			item = emjh_construct_item(eph, group, node);
@@ -258,7 +258,7 @@
 
 	node = root->children;
 	while (node) {
-		if (strcmp(node->name, "group") == 0) {
+		if (strcmp((char *)node->name, "group") == 0) {
 			struct _EMJunkHookGroup *group;
 
 			group = emjh_construct_group(eph, node);
Index: em-folder-tree-model.c
===================================================================
--- em-folder-tree-model.c	(révision 33519)
+++ em-folder-tree-model.c	(copie de travail)
@@ -333,17 +333,17 @@
 		return;
 	
 	/* setup some defaults - expand "Local Folders" and "Search Folders" */
-	model->state = xmlNewDoc ("1.0");
-	root = xmlNewDocNode (model->state, NULL, "tree-state", NULL);
+	model->state = xmlNewDoc ((const unsigned char *)"1.0");
+	root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
 	xmlDocSetRootElement (model->state, root);
 	
-	node = xmlNewChild (root, NULL, "node", NULL);
-	xmlSetProp (node, "name", "local");
-	xmlSetProp (node, "expand", "true");
-	
-	node = xmlNewChild (root, NULL, "node", NULL);
-	xmlSetProp (node, "name", "vfolder");
-	xmlSetProp (node, "expand", "true");
+	node = xmlNewChild (root, NULL, (const unsigned char *)"node", NULL);
+	xmlSetProp (node, (const unsigned char *)"name", (const unsigned char *)"local");
+	xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)"true");
+	
+	node = xmlNewChild (root, NULL, (const unsigned char *)"node", NULL);
+	xmlSetProp (node, (const unsigned char *)"name", (const unsigned char *)"vfolder");
+	xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)"true");
 }
 
 
@@ -941,8 +941,8 @@
 	
 	node = root->children;
 	while (node != NULL) {
-		if (!strcmp (node->name, "node")) {
-			nname = xmlGetProp (node, "name");
+		if (!strcmp ((char *)node->name, "node")) {
+			nname = (char *)xmlGetProp (node, (const unsigned char *)"name");
 			if (nname && !strcmp (nname, name)) {
 				xmlFree (nname);
 				return node;
@@ -969,7 +969,7 @@
 	   Second, it shouldn't use an xml tree to store a bit table in memory! */
 
 	node = model->state ? model->state->children : NULL;
-	if (!node || strcmp (node->name, "tree-state") != 0)
+	if (!node || strcmp ((char *)node->name, "tree-state") != 0)
 		return FALSE;
 	
 	name = buf = g_alloca (strlen (key) + 1);
@@ -985,8 +985,8 @@
 		if ((node = find_xml_node (node, name))) {
 			gboolean expanded;
 			
-			buf = xmlGetProp (node, "expand");
-			expanded = buf && !strcmp (buf, "true");
+			buf = (char *)xmlGetProp (node, (const unsigned char *)"expand");
+			expanded = buf && !strcmp ((char *)buf, "true");
 			xmlFree (buf);
 			
 			if (!expanded || p == NULL)
@@ -1008,10 +1008,10 @@
 	char *buf, *p;
 	
 	if (model->state == NULL)
-		model->state = xmlNewDoc ("1.0");
+		model->state = xmlNewDoc ((const unsigned char *)"1.0");
 	
 	if (!model->state->children) {
-		node = xmlNewDocNode (model->state, NULL, "tree-state", NULL);
+		node = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
 		xmlDocSetRootElement (model->state, node);
 	} else {
 		node = model->state->children;
@@ -1035,11 +1035,11 @@
 			}
 			
 			/* node (or parent node) doesn't exist, need to add it */
-			node = xmlNewChild (parent, NULL, "node", NULL);
-			xmlSetProp (node, "name", name);
+			node = xmlNewChild (parent, NULL, (const unsigned char *)"node", NULL);
+			xmlSetProp (node, (const unsigned char *)"name", (unsigned char *)name);
 		}
 		
-		xmlSetProp (node, "expand", expanded || p ? "true" : "false");
+		xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)(expanded || p ? "true" : "false"));
 		
 		name = p ? p + 1 : NULL;
 	} while (name);
@@ -1072,11 +1072,11 @@
 	char *path, *name, *expand;
 	
 	while (node != NULL) {
-		if (!strcmp (node->name, "node")) {
-			name = xmlGetProp (node, "name");
-			expand = xmlGetProp (node, "expand");
+		if (!strcmp ((char *)node->name, "node")) {
+			name = (char *)xmlGetProp (node, (const unsigned char *)"name");
+			expand = (char *)xmlGetProp (node, (const unsigned char *)"expand");
 			
-			if (expand && name && !strcmp (expand, "true")) {
+			if (expand && name && !strcmp ((char *)expand, "true")) {
 				if (dirname)
 					path = g_strdup_printf ("%s/%s", dirname, name);
 				else
@@ -1102,7 +1102,7 @@
 	xmlNodePtr root;
 	
 	root = model->state ? model->state->children : NULL;
-	if (!root || !root->children || strcmp (root->name, "tree-state") != 0)
+	if (!root || !root->children || strcmp ((char *)root->name, "tree-state") != 0)
 		return;
 	
 	expand_foreach_r (model, root, NULL, func, user_data);
@@ -1141,7 +1141,7 @@
 
 	gtk_tree_path_free (tree_path);
 	
-	gtk_tree_model_get (model, &iter, COL_UINT_FLAGS, &flags, -1);
+	gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, COL_UINT_FLAGS, &flags, -1);
 
 	if ((flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_INBOX)
 		return TRUE;
@@ -1195,12 +1195,12 @@
 	char *buf, *uri;
 	
 	node = model->state ? model->state->children : NULL;
-	if (!node || strcmp (node->name, "tree-state") != 0)
+	if (!node || strcmp ((char *)node->name, "tree-state") != 0)
 		return NULL;
 	
 	node = node->children;
 	while (node != NULL) {
-		if (!strcmp (node->name, "selected"))
+		if (!strcmp ((char *)node->name, "selected"))
 			break;
 		node = node->next;
 	}
@@ -1208,7 +1208,7 @@
 	if (node == NULL)
 		return NULL;
 	
-	buf = xmlGetProp (node, "uri");
+	buf = (char *)xmlGetProp (node, (unsigned char *)"uri");
 	uri = g_strdup (buf);
 	xmlFree (buf);
 	
@@ -1222,10 +1222,10 @@
 	xmlNodePtr root, node;
 	
 	if (model->state == NULL)
-		model->state = xmlNewDoc ("1.0");
+		model->state = xmlNewDoc ((unsigned char *)"1.0");
 	
 	if (!model->state->children) {
-		root = xmlNewDocNode (model->state, NULL, "tree-state", NULL);
+		root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
 		xmlDocSetRootElement (model->state, root);
 	} else {
 		root = model->state->children;
@@ -1233,13 +1233,13 @@
 	
 	node = root->children;
 	while (node != NULL) {
-		if (!strcmp (node->name, "selected"))
+		if (!strcmp ((char *)node->name, "selected"))
 			break;
 		node = node->next;
 	}
 	
 	if (node == NULL)
-		node = xmlNewChild (root, NULL, "selected", NULL);
+		node = xmlNewChild (root, NULL, (const unsigned char *)"selected", NULL);
 	
-	xmlSetProp (node, "uri", uri);
+	xmlSetProp (node, (const unsigned char *)"uri", (unsigned char *)uri);
 }
Index: em-filter-folder-element.c
===================================================================
--- em-filter-folder-element.c	(révision 33519)
+++ em-filter-folder-element.c	(copie de travail)
@@ -176,12 +176,12 @@
 	
 	d(printf("Encoding folder as xml\n"));
 	
-	value = xmlNewNode(NULL, "value");
-	xmlSetProp(value, "name", fe->name);
-	xmlSetProp(value, "type", "folder");
+	value = xmlNewNode(NULL, (unsigned const char *)"value");
+	xmlSetProp(value, (unsigned const char *)"name", (unsigned char *)fe->name);
+	xmlSetProp(value, (unsigned const char *)"type", (unsigned const char *)"folder");
 	
-	work = xmlNewChild(value, NULL, "folder", NULL);
-	xmlSetProp(work, "uri", ff->uri);
+	work = xmlNewChild(value, NULL, (unsigned const char *)"folder", NULL);
+	xmlSetProp(work, (unsigned const char *)"uri", (unsigned const char *)ff->uri);
 	
 	return value;
 }
@@ -195,14 +195,14 @@
 	d(printf("Decoding folder from xml %p\n", fe));
 	
 	xmlFree(fe->name);
-	fe->name = xmlGetProp(node, "name");
+	fe->name = (char *)xmlGetProp(node, (unsigned const char *)"name");
 	
 	n = node->children;
 	while(n) {
-		if (!strcmp(n->name, "folder")) {
+		if (!strcmp((char *)n->name, "folder")) {
 			char *uri;
 			
-			uri = xmlGetProp(n, "uri");
+			uri = (char *)xmlGetProp(n, (unsigned const char *)"uri");
 			g_free(ff->uri);
 			ff->uri = g_strdup(uri);
 			xmlFree(uri);
Index: em-format-hook.c
===================================================================
--- em-format-hook.c	(révision 33519)
+++ em-format-hook.c	(copie de travail)
@@ -143,7 +143,7 @@
 
 	node = root->children;
 	while (node) {
-		if (0 == strcmp(node->name, "item")) {
+		if (0 == strcmp((char *)node->name, "item")) {
 			struct _EMFormatHookItem *item;
 
 			item = emfh_construct_item(eph, group, node);
@@ -171,7 +171,7 @@
 
 	node = root->children;
 	while (node) {
-		if (strcmp(node->name, "group") == 0) {
+		if (strcmp((char *)node->name, "group") == 0) {
 			struct _EMFormatHookGroup *group;
 
 			group = emfh_construct_group(eph, node);
Index: em-filter-rule.c
===================================================================
--- em-filter-rule.c	(révision 33519)
+++ em-filter-rule.c	(copie de travail)
@@ -221,7 +221,7 @@
 	
         node = FILTER_RULE_CLASS(parent_class)->xml_encode(fr);
 	g_assert(node != NULL);
-	set = xmlNewNode(NULL, "actionset");
+	set = xmlNewNode(NULL, (const unsigned char *)"actionset");
 	xmlAddChild(node, set);
 	l = ff->actions;
 	while (l) {
@@ -243,8 +243,8 @@
 	
 	work = node->children;
 	while (work) {
-		if (!strcmp(work->name, "part")) {
-			rulename = xmlGetProp(work, "name");
+		if (!strcmp((char *)work->name, "part")) {
+			rulename = (char *)xmlGetProp(work, (const unsigned char *)"name");
 			part = em_filter_context_find_action((EMFilterContext *)rc, rulename);
 			if (part) {
 				part = filter_part_clone(part);
@@ -274,7 +274,7 @@
 	
 	work = node->children;
 	while (work) {
-		if (!strcmp(work->name, "actionset")) {
+		if (!strcmp((char *)work->name, "actionset")) {
 			load_set(work, ff, rc);
 		}
 		work = work->next;
Index: em-format-html.c
===================================================================
--- em-format-html.c	(révision 33519)
+++ em-format-html.c	(copie de travail)
@@ -565,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;
-		int length = 0;
+		guint length = 0;
 		gboolean status;
 		
 		status = g_file_get_contents (url, &data, &length, NULL);
@@ -767,7 +781,7 @@
    					"<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px;\">\n",
    					efh->frame_colour & 0xffffff, efh->content_colour & 0xffffff);
 			camel_stream_write_string(stream, "<tt>\n");
-			em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, newpart);
+			em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)newpart);
 			camel_stream_flush((CamelStream *)filtered_stream);
 			camel_stream_write_string(stream, "</tt>\n");
 			camel_stream_write_string(stream, "</div>\n");
@@ -807,7 +821,7 @@
 			     "<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px;\">\n",
 			     efh->frame_colour & 0xffffff, efh->content_colour & 0xffffff);
 
-	em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, part);
+	em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
 	
 	camel_object_unref(filtered_stream);
 	camel_stream_write_string(stream, "</div>");
@@ -829,7 +843,7 @@
 		camel_data_wrapper_write_to_stream(dw, out);
 	camel_object_unref(out);
 #endif
-	em_format_format_text(emf, stream, puri->part);
+	em_format_format_text(emf, stream, (CamelDataWrapper *)puri->part);
 }
 
 static void
@@ -985,7 +999,7 @@
 	camel_object_unref(html_filter);
 
 	camel_stream_write_string(stream, "<tt>\n");
-	em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, part);
+	em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
 	camel_stream_flush((CamelStream *)filtered_stream);
 	camel_stream_write_string(stream, "</tt>\n");
 
@@ -1519,7 +1533,7 @@
 				
 				g_string_append_printf (out, "%s &lt;", name);
 				/* rfc2368 for mailto syntax and url encoding extras */
-				if ((real = camel_header_encode_phrase (a->name))) {
+				if ((real = camel_header_encode_phrase ((unsigned char *)a->name))) {
 					mailaddr = g_strdup_printf("%s <%s>", real, a->v.addr);
 					g_free (real);
 					mailto = camel_url_encode (mailaddr, "?=&()");
@@ -1641,7 +1655,7 @@
 		label = _(name);
 		
 		html = g_string_new("");
-		img = efh_format_address(efh, html, addrs, label);
+		img = efh_format_address(efh, html, addrs, (char *)label);
 		
 		if (img) {
 //			str_field = g_strdup_printf ("<table><tr><td valign=top>%s</td><td valign=top><b>%s:</b></td></tr></table>", img, label);
Index: mail-session.c
===================================================================
--- mail-session.c	(révision 33519)
+++ mail-session.c	(copie de travail)
@@ -729,7 +729,7 @@
 	ms->junk_plugins = g_list_append(ms->junk_plugins, junk_plugin);
 	if (def_plugin &&  plugin_name) {
 		if (!strcmp(def_plugin, plugin_name)) {
-			printf("Loading %s as the default junk plugin\n");
+			printf("Loading %s as the default junk plugin\n", def_plugin);
 			session->junk_plugin = junk_plugin;
 		}
 	}
Index: em-filter-source-element.c
===================================================================
--- em-filter-source-element.c	(révision 33519)
+++ em-filter-source-element.c	(copie de travail)
@@ -177,12 +177,12 @@
 	
 	EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
 	
-	value = xmlNewNode(NULL, "value");
-	xmlSetProp(value, "name", fe->name);
-	xmlSetProp(value, "type", "uri");
+	value = xmlNewNode(NULL, (const unsigned char *)"value");
+	xmlSetProp(value, (const unsigned char *)"name", (unsigned char *)fe->name);
+	xmlSetProp(value, (const unsigned char *)"type", (const unsigned char *)"uri");
 	
 	if (fs->priv->current_url)
-		xmlNewTextChild(value, NULL, "uri", fs->priv->current_url);
+		xmlNewTextChild(value, NULL, (const unsigned char *)"uri", (unsigned char *)fs->priv->current_url);
 	
 	return value;
 }
@@ -196,8 +196,8 @@
 	
 	node = node->children;
 	while (node != NULL) {
-		if (!strcmp(node->name, "uri")) {
-			uri = xmlNodeGetContent(node);
+		if (!strcmp((char *)node->name, "uri")) {
+			uri = (char *)xmlNodeGetContent(node);
 			url = camel_url_new(uri, NULL);
 			xmlFree(uri);
 			
@@ -220,7 +220,7 @@
 	EMFilterSourceElement *cpy = em_filter_source_element_new();
 	GList *i;
 	
-	((FilterElement *)cpy)->name = xmlStrdup(fe->name);
+	((FilterElement *)cpy)->name = (char *)xmlStrdup((unsigned char *)fe->name);
 	
 	cpy->priv->current_url = g_strdup(fs->priv->current_url);
 	
Index: mail-component.c
===================================================================
--- mail-component.c	(révision 33519)
+++ mail-component.c	(copie de travail)
@@ -703,7 +703,7 @@
 	
 	if ((uri = em_folder_tree_model_get_selected (priv->model))) {
 		em_folder_tree_set_selected ((EMFolderTree *) tree_widget, uri);
-		em_folder_view_set_folder_uri (view_widget, uri);				
+		em_folder_view_set_folder_uri ((EMFolderView *) view_widget, uri);
 		g_free (uri);
 	}
 	
@@ -1075,7 +1075,7 @@
 int 
 status_check (GNOME_Evolution_ShellState shell_state)
 {
-	int status;
+	int status = 0;
 
 	switch (shell_state)
 	{
Index: mail-config.c
===================================================================
--- mail-config.c	(révision 33519)
+++ mail-config.c	(copie de travail)
@@ -1130,7 +1130,7 @@
 		   are known to not ever read the manual... we try to do our best if the
                    content isn't valid UTF-8 by assuming that the content is in the user's
 		   preferred charset. */
-		if (!g_utf8_validate (buffer->data, buffer->len, NULL)) {
+		if (!g_utf8_validate ((char *)buffer->data, buffer->len, NULL)) {
 			stream = (CamelStream *) memstream;
 			memstream = (CamelStreamMem *) camel_stream_mem_new ();
 			camel_stream_mem_set_byte_array (memstream, g_byte_array_new ());
@@ -1156,8 +1156,8 @@
 		
 		camel_object_unref (memstream);
 		
-		g_byte_array_append (buffer, "", 1);
-		content = buffer->data;
+		g_byte_array_append (buffer, (const unsigned char *)"", 1);
+		content = (char *)buffer->data;
 		g_byte_array_free (buffer, FALSE);
 		
 		/* wait for the script process to terminate */
Index: em-mailer-prefs.c
===================================================================
--- em-mailer-prefs.c	(révision 33519)
+++ em-mailer-prefs.c	(copie de travail)
@@ -65,8 +65,6 @@
 static void em_mailer_prefs_init       (EMMailerPrefs *dialog);
 static void em_mailer_prefs_finalise   (GObject *obj);
 
-GtkWidget * create_combo_text_widget ();
-
 static GtkVBoxClass *parent_class = NULL;
 
 enum {
@@ -190,7 +188,6 @@
 	GSList *l, *n, *list = NULL;
 	const char *cstring;
 	char *string;
-	guint32 rgb;
 	int i;
 	
 	for (i = 4; i >= 0; i--) {
@@ -373,7 +370,7 @@
 	GtkTreeIter iter;
 	const gchar *text = gtk_entry_get_text (prefs->entry_header);
 	
-	g_strstrip (text);
+	g_strstrip ((gchar *)text);
 
 	if (text && (strlen (text)>0)) {
 		gtk_list_store_append (GTK_LIST_STORE (model), &iter);
@@ -507,6 +504,8 @@
 	gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
 }
 
+#if 0
+// not used at the moment, commenting out
 static void
 toggle_button_toggled_not (GtkToggleButton *toggle, EMMailerPrefs *prefs)
 {
@@ -515,6 +514,7 @@
 	key = g_object_get_data ((GObject *) toggle, "key");
 	gconf_client_set_bool (prefs->gconf, key, !gtk_toggle_button_get_active (toggle), NULL);
 }
+#endif
 
 static void
 custom_font_changed (GtkToggleButton *toggle, EMMailerPrefs *prefs)
@@ -761,7 +761,7 @@
 static void
 junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
 {
-	char *def_plugin = gtk_combo_box_get_active_text(combo);
+	char *def_plugin = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo));
 	const GList *plugins = mail_session_get_junk_plugins();
 	
 	gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", def_plugin, NULL);
@@ -769,10 +769,9 @@
 		struct _EMJunkHookItem *item = plugins->data;;
 
 		if (item->plugin_name && def_plugin && !strcmp (item->plugin_name, def_plugin)) {
-			gboolean status;
 			session->junk_plugin = CAMEL_JUNK_PLUGIN (&(item->csp));
-			status = e_plugin_invoke(item->hook->hook.plugin, item->validate_binary, NULL);
-			if (status) {
+			void *status = e_plugin_invoke(item->hook->hook.plugin, item->validate_binary, NULL);
+			if ((gboolean)status == TRUE) {
 				char *text, *html;
 				gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU);
 				text = g_strdup_printf ("%s plugin is available and the binary is installed.", item->plugin_name);
@@ -803,12 +802,12 @@
 	const GList *plugins = mail_session_get_junk_plugins();
 	char *pdefault = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
 
-	if (!plugins || !g_list_length (plugins)) {
-		gtk_combo_box_append_text (combo, _("No Junk plugin available"));
-		gtk_combo_box_set_active (combo, 0);		
-		gtk_widget_set_sensitive ((GtkWidget *) combo, FALSE);
-		gtk_widget_hide (prefs->plugin_image);
-		gtk_widget_hide (prefs->plugin_status);
+	if (!plugins || !g_list_length ((GList *)plugins)) {
+		gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("No Junk plugin available"));
+		gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);		
+		gtk_widget_set_sensitive (GTK_WIDGET (combo), FALSE);
+		gtk_widget_hide (GTK_WIDGET (prefs->plugin_image));
+		gtk_widget_hide (GTK_WIDGET (prefs->plugin_status));
 		gtk_image_set_from_stock (prefs->plugin_image, NULL, 0);
 		g_free (pdefault);
 		
@@ -818,13 +817,13 @@
 	while (plugins) {
 		struct _EMJunkHookItem *item = plugins->data;;
 		
-		gtk_combo_box_append_text (combo, item->plugin_name);
+		gtk_combo_box_append_text (GTK_COMBO_BOX (combo), item->plugin_name);
 		if (!def_set && pdefault && item->plugin_name && !strcmp(pdefault, item->plugin_name)) {
 			gboolean status;
 			
 			def_set = TRUE;
-			gtk_combo_box_set_active (combo, index);
-			status = e_plugin_invoke(item->hook->hook.plugin, item->validate_binary, NULL);
+			gtk_combo_box_set_active (GTK_COMBO_BOX (combo), index);
+			status = (gboolean)e_plugin_invoke(item->hook->hook.plugin, item->validate_binary, NULL);
 			if (status) {
 				char *text, *html;
 				gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU);
@@ -1134,7 +1133,7 @@
 		h = g_malloc (sizeof (struct _EMMailerPrefsHeader));
 		h->is_default = TRUE;
 		h->name = g_strdup (default_headers[i]);
-		h->enabled = strcmp (default_headers[i], "x-evolution-mailer") != 0;
+		h->enabled = strcmp ((char *)default_headers[i], "x-evolution-mailer") != 0;
 		g_hash_table_insert (default_header_hash, (gpointer) default_headers[i], h);
 		header_add_list = g_slist_append (header_add_list, h);
 	}
@@ -1202,7 +1201,7 @@
 	prefs->default_junk_plugin = GTK_COMBO_BOX (glade_xml_get_widget (gui, "default_junk_plugin"));
 	prefs->plugin_status = GTK_LABEL (glade_xml_get_widget (gui, "plugin_status"));
 	prefs->plugin_image = GTK_IMAGE (glade_xml_get_widget (gui, "plugin_image"));	
-	junk_plugin_setup (prefs->default_junk_plugin, prefs);
+	junk_plugin_setup (GTK_WIDGET (prefs->default_junk_plugin), prefs);
 	
 	/* get our toplevel widget */
 	target = em_config_target_new_prefs(ec, prefs->gconf);
@@ -1234,18 +1233,18 @@
 		return NULL;
 	
 	root = doc->children;
-	if (strcmp (root->name, "header") != 0)
+	if (strcmp ((char *)root->name, "header") != 0)
 		return NULL;
 	
-	name = xmlGetProp (root, "name");
+	name = xmlGetProp (root, (const unsigned char *)"name");
 	if (name == NULL)
 		return NULL;
 	
 	h = g_malloc0 (sizeof (struct _EMMailerPrefsHeader));
-	h->name = g_strdup (name);
+	h->name = g_strdup ((gchar *)name);
 	xmlFree (name);
 	
-	if (xmlHasProp (root, "enabled"))
+	if (xmlHasProp (root, (const unsigned char *)"enabled"))
 		h->enabled = 1;
 	else
 		h->enabled = 0;
@@ -1268,7 +1267,7 @@
 	struct _EMMailerPrefsHeader *header;
 	xmlDocPtr doc;
 	
-	if (!(doc = xmlParseDoc ((char *) xml)))
+	if (!(doc = xmlParseDoc ((unsigned char *) xml)))
 		return NULL;
 	
 	header = emmp_header_from_xmldoc (doc);
@@ -1313,12 +1312,12 @@
 	g_return_val_if_fail (header != NULL, NULL);
 	g_return_val_if_fail (header->name != NULL, NULL);
 	
-	doc = xmlNewDoc ("1.0");
+	doc = xmlNewDoc ((const unsigned char *)"1.0");
 	
-	root = xmlNewDocNode (doc, NULL, "header", NULL);
-	xmlSetProp (root, "name", header->name);
+	root = xmlNewDocNode (doc, NULL, (const unsigned char *)"header", NULL);
+	xmlSetProp (root, (const unsigned char *)"name", (unsigned char *)header->name);
 	if (header->enabled)
-		xmlSetProp (root, "enabled", NULL);
+		xmlSetProp (root, (const unsigned char *)"enabled", NULL);
 	
 	xmlDocSetRootElement (doc, root);
 	xmlDocDumpMemory (doc, &xml, &size);
Index: em-mailer-prefs.h
===================================================================
--- em-mailer-prefs.h	(révision 33519)
+++ em-mailer-prefs.h	(copie de travail)
@@ -140,6 +140,7 @@
 };
 
 GtkType em_mailer_prefs_get_type (void);
+GtkWidget * create_combo_text_widget ();
 
 struct _GtkWidget *em_mailer_prefs_new (void);
 
Index: message-list.c
===================================================================
--- message-list.c	(révision 33519)
+++ message-list.c	(copie de travail)
@@ -361,7 +361,7 @@
 	e_mail_address_free (addr1);
 	e_mail_address_free (addr2);
 #else
-	retval = strcmp ((const char *) address1, (const char *) address2);
+	retval = strcmp ((char *) address1, (char *) address2);
 #endif /* SMART_ADDRESS_COMPARE */
 	
 	return retval;
@@ -459,7 +459,7 @@
 		const unsigned char *subject;
 		
 		subject = (const unsigned char *) string;
-		while (!g_ascii_strncasecmp (subject, "Re:", 3)) {
+		while (!g_ascii_strncasecmp ((char *)subject, "Re:", 3)) {
 			subject += 3;
 			
 			/* jump over any spaces */
@@ -1710,6 +1710,7 @@
 	if (message_list->folder) {
 		char *path;
 		char *name;
+		int data = 1;
 		struct stat st;
 		ETableItem *item = e_tree_get_item (message_list->tree);
 
@@ -1721,7 +1722,7 @@
 		d(printf ("folder name is '%s'\n", name));
 		
 		path = mail_config_folder_to_cachename (message_list->folder, "et-expanded-");
-		g_object_set_data (G_OBJECT (((GnomeCanvasItem *) item)->canvas), "freeze-cursor", 1);
+		g_object_set_data (G_OBJECT (((GnomeCanvasItem *) item)->canvas), "freeze-cursor", &data);
 
 		if (path && g_stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) {
 			/* build based on saved file */
@@ -3597,7 +3598,7 @@
 {
 	char *filename;
 	FILE *in;
-	guint32 version, lower, upper;
+	gint32 version, lower, upper;
 
 	MESSAGE_LIST_LOCK(ml, hide_lock);
 	if (ml->hidden) {
Index: em-folder-tree.c
===================================================================
--- em-folder-tree.c	(révision 33519)
+++ em-folder-tree.c	(copie de travail)
@@ -807,7 +807,7 @@
 	switch (info) {
 	case DND_DRAG_TYPE_FOLDER:
 		/* dragging to a new location in the folder tree */
-		gtk_selection_data_set(selection, drag_atoms[info], 8, uri, strlen (uri) + 1);
+		gtk_selection_data_set(selection, drag_atoms[info], 8, (unsigned char *)uri, strlen (uri) + 1);
 		break;
 	case DND_DRAG_TYPE_TEXT_URI_LIST:
 		/* dragging to nautilus or something, probably */
@@ -859,7 +859,7 @@
 
 	d(printf(" * Drop folder '%s' onto '%s'\n", m->selection->data, m->full_name));
 
-	if (!(src = mail_tool_uri_to_folder(m->selection->data, 0, &m->msg.ex)))
+	if (!(src = mail_tool_uri_to_folder((char *)m->selection->data, 0, &m->msg.ex)))
 		return;
 
 	em_folder_utils_copy_folders(src->parent_store, src->full_name, m->store, m->full_name?m->full_name:"", m->move);
@@ -874,7 +874,7 @@
 	char *buf;
 	
 	if (m->info == DND_DROP_TYPE_FOLDER) {
-		url = camel_url_new (m->selection->data, NULL);
+		url = camel_url_new ((char *)m->selection->data, NULL);
 		
 		if (m->move)
 			buf = g_strdup_printf (_("Moving folder %s"), url->fragment ? url->fragment : url->path + 1);
