Index: ChangeLog
===================================================================
--- ChangeLog	(révision 33572)
+++ ChangeLog	(copie de travail)
@@ -1,3 +1,19 @@
+2007-05-22  Gilles Dartiguelongue  <dartigug@esiee.fr>
+
+	** Fixes part of bug #441014
+
+	* e-dateedit.c: (rebuild_time_popup):
+	* e-filter-bar.c: (get_property), (xml_get_prop_int),
+	(set_property):
+	* e-image-chooser.c: (set_image_from_data),
+	(image_drag_data_received_cb):
+	* e-task-widget.c: (e_task_widget_construct):
+	* e-unicode.c: (e_utf8_strstrcasedecomp), (e_utf8_strstrcase),
+	(e_utf8_from_iconv_string_sized), (e_utf8_to_iconv_string_sized),
+	(e_utf8_xml1_decode), (e_utf8_xml1_encode),
+	(e_xml_get_translated_utf8_string_prop_by_name): various
+	compilation cleanups.
+
 2007-05-21  Wang Xin  <jedy.wang@sun.com>
 
 	* e-dateedit.c: Fixes #439049.
Index: e-image-chooser.c
===================================================================
--- e-image-chooser.c	(révision 33572)
+++ e-image-chooser.c	(copie de travail)
@@ -232,7 +232,7 @@
 	GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
 	GdkPixbuf *pixbuf;
 
-	gdk_pixbuf_loader_write (loader, data, length, NULL);
+	gdk_pixbuf_loader_write (loader, (unsigned char *)data, length, NULL);
 	gdk_pixbuf_loader_close (loader, NULL);
 	
 	pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
@@ -413,15 +413,15 @@
 		GnomeVFSResult result;
 		GnomeVFSHandle *handle;
 		char *uri;
-		char *nl = strstr (selection_data->data, "\r\n");
+		char *nl = strstr ((char *)selection_data->data, "\r\n");
 		char *buf = NULL;
 		/* Why can't we change the info parameter to a GnomeVFSFileInfo and use that? */
 		GnomeVFSFileInfo info;
 
 		if (nl)
-			uri = g_strndup (selection_data->data, nl - (char*)selection_data->data);
+			uri = g_strndup ((char *)selection_data->data, nl - (char*)selection_data->data);
 		else
-			uri = g_strdup (selection_data->data);
+			uri = g_strdup ((char *)selection_data->data);
 
 		result = gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ);
 		if (result == GNOME_VFS_OK) {
Index: e-unicode.c
===================================================================
--- e-unicode.c	(révision 33572)
+++ e-unicode.c	(copie de travail)
@@ -71,7 +71,7 @@
 	gunichar *nuni;
 	gunichar unival;
 	gint nlen;
-	const guchar *o, *p;
+	const gchar *o, *p;
 
 	if (haystack == NULL) return NULL;
 	if (needle == NULL) return NULL;
@@ -126,7 +126,7 @@
 	gunichar *nuni;
 	gunichar unival;
 	gint nlen;
-	const guchar *o, *p;
+	const gchar *o, *p;
 
 	if (haystack == NULL) return NULL;
 	if (needle == NULL) return NULL;
@@ -248,7 +248,7 @@
 		gint i;
 		/* iso-8859-1 */
 		ib = (char *) string;
-		new = ob = g_new (unsigned char, bytes * 2 + 1);
+		new = ob = (char *)g_new (unsigned char, bytes * 2 + 1);
 		for (i = 0; i < (bytes); i ++) {
 			ob += e_unichar_to_utf8 (ib[i], ob);
 		}
@@ -307,7 +307,7 @@
 		const gchar *u;
 		gunichar uc;
 
-		new = g_new (unsigned char, bytes * 4 + 1);
+		new = (char *)g_new (unsigned char, bytes * 4 + 1);
 		u = string;
 		len = 0;
 
@@ -512,7 +512,7 @@
 e_utf8_xml1_decode (const gchar *text)
 {
 	const guchar *c;
-	guchar *u, *d;
+	gchar *u, *d;
 	int len, s;
 
 	g_return_val_if_fail (text != NULL, NULL);
@@ -521,7 +521,7 @@
 	/* len * 2 is absolute maximum */
 	u = d = g_malloc (len * 2);
 
-	c = text;
+	c = (guchar *)text;
 	s = 0;
 	while (s < len) {
 		if ((s <= (len - 8)) &&
@@ -534,8 +534,8 @@
 		    isxdigit (c[s + 6]) &&
 		    (c[s + 7] == '\\')) {
 			/* Valid \U+XXXX\ sequence */
-			unsigned int unival;
-			unival = strtol (c + s + 3, NULL, 16);
+			int unival;
+			unival = strtol ((char *)(c + s + 3), NULL, 16);
 			d += e_unichar_to_utf8 (unival, d);
 			s += 8;
 		} else if (c[s] > 127) {
@@ -555,8 +555,8 @@
 gchar *
 e_utf8_xml1_encode (const gchar *text)
 {
-	guchar *u, *d, *c;
-	int unival;
+	gchar *u, *d, *c;
+	unsigned int unival;
 	int len;
 
 	g_return_val_if_fail (text != NULL, NULL);
@@ -569,7 +569,7 @@
 			len += 1;
 		}
 	}
-	d = c = g_new (guchar, len + 1);
+	d = c = (char *)g_new (guchar, len + 1);
 
 	for (u = e_unicode_get_utf8 (text, &unival); u && unival; u = e_unicode_get_utf8 (u, &unival)) {
 		if ((unival >= 0x80) || (unival == '\\')) {
@@ -667,7 +667,7 @@
 typedef struct
 {
   unsigned short ch;
-  unsigned char *expansion;
+  char *expansion;
 } e_decomposition;
 
 static e_decomposition e_decomp_table[] =
@@ -2036,15 +2036,15 @@
 
 	prop = xmlGetProp ((xmlNode *) parent, prop_name);
 	if (prop != NULL) {
-		ret_val = g_strdup (prop);
+		ret_val = g_strdup ((char *)prop);
 		xmlFree (prop);
 		return ret_val;
 	}
 
 	combined_name = g_strdup_printf("_%s", prop_name);
-	prop = xmlGetProp ((xmlNode *) parent, combined_name);
+	prop = xmlGetProp ((xmlNode *) parent, (unsigned char *)combined_name);
 	if (prop != NULL) {
-		ret_val = g_strdup (gettext (prop));
+		ret_val = g_strdup (gettext ((char *)prop));
 		xmlFree (prop);
 	}
 	g_free(combined_name);
Index: e-filter-bar.c
===================================================================
--- e-filter-bar.c	(révision 33572)
+++ e-filter-bar.c	(copie de travail)
@@ -586,15 +586,16 @@
 		break;
 	case PROP_STATE: {
 		/* FIXME: we should have ESearchBar save its own state to the xmlDocPtr */
-		char *xmlbuf, *text, buf[12];
+		xmlChar *xmlbuf;
+		char *text, buf[12];
 		int searchscope, item_id, n, view_id;
 		xmlNodePtr root, node;
 		xmlDocPtr doc;
 		
 		item_id = e_search_bar_get_item_id ((ESearchBar *) efb);
 		
-		doc = xmlNewDoc ("1.0");
-		root = xmlNewDocNode (doc, NULL, "state", NULL);
+		doc = xmlNewDoc ((const unsigned char *)"1.0");
+		root = xmlNewDocNode (doc, NULL, (const unsigned char *)"state", NULL);
 		xmlDocSetRootElement (doc, root);
 		searchscope = e_search_bar_get_search_scope ((ESearchBar *) efb);
 		view_id = e_search_bar_get_viewitem_id ((ESearchBar *) efb);
@@ -604,37 +605,37 @@
 		
 		if (item_id == E_FILTERBAR_ADVANCED_ID) {
 			/* advanced query, save the filterbar state */
-			node = xmlNewChild (root, NULL, "filter-bar", NULL);
+			node = xmlNewChild (root, NULL, (const unsigned char *)"filter-bar", NULL);
 
 			sprintf (buf, "%d", esb->last_search_option);
-			xmlSetProp (node, "item_id", buf);
+			xmlSetProp (node, (const unsigned char *)"item_id", (unsigned char *)buf);
 			sprintf (buf, "%d", searchscope);
-			xmlSetProp (node, "searchscope", buf);
+			xmlSetProp (node, (const unsigned char *)"searchscope", (unsigned char *)buf);
 			sprintf (buf, "%d", view_id);
-			xmlSetProp (node, "view_id", buf);
+			xmlSetProp (node, (const unsigned char *)"view_id", (unsigned char *)buf);
 			
 			xmlAddChild (node, filter_rule_xml_encode (efb->current_query));			
 		} else {
 			/* simple query, save the searchbar state */
 			text = e_search_bar_get_text ((ESearchBar *) efb);
 			
-			node = xmlNewChild (root, NULL, "search-bar", NULL);
-			xmlSetProp (node, "text", text ? text : "");
+			node = xmlNewChild (root, NULL, (const unsigned char *)"search-bar", NULL);
+			xmlSetProp (node, (const unsigned char *)"text", (unsigned char *)(text ? text : ""));
 			sprintf (buf, "%d", item_id);
-			xmlSetProp (node, "item_id", buf);
+			xmlSetProp (node, (const unsigned char *)"item_id", (unsigned char *)buf);
 			sprintf (buf, "%d", searchscope);
-			xmlSetProp (node, "searchscope", buf);
+			xmlSetProp (node, (const unsigned char *)"searchscope", (unsigned char *)buf);
 			sprintf (buf, "%d", view_id);
-			xmlSetProp (node, "view_id", buf);			
+			xmlSetProp (node, (const unsigned char *)"view_id", (unsigned char *)buf);
 			g_free (text);
 		}
 		
-		xmlDocDumpMemory (doc, (xmlChar **) &xmlbuf, &n);
+		xmlDocDumpMemory (doc, &xmlbuf, &n);
 		xmlFreeDoc (doc);
 		
 		/* remap to glib memory */
 		text = g_malloc (n + 1);
-		memcpy (text, xmlbuf, n);
+		memcpy (text, (char *)xmlbuf, n);
 		text[n] = '\0';
 		xmlFree (xmlbuf);
 		
@@ -653,7 +654,7 @@
 	char *buf;
 	int ret;
 	
-	if ((buf = xmlGetProp (node, prop))) {
+	if ((buf = (char *)xmlGetProp (node, (unsigned char *)prop))) {
 		ret = strtol (buf, NULL, 10);
 		xmlFree (buf);
 	} else {
@@ -677,18 +678,18 @@
 	switch (property_id) {
 	case PROP_STATE:
 		if ((state = g_value_get_string (value))) {
-			if (!(doc = xmlParseDoc ((char *) state)))
+			if (!(doc = xmlParseDoc ((unsigned char *) state)))
 				return;
 			
 			root = doc->children;
-			if (strcmp (root->name, "state") != 0) {
+			if (strcmp ((char *)root->name, "state") != 0) {
 				xmlFreeDoc (doc);
 				return;
 			}
 			
 			node = root->children;
 			while (node != NULL) {
-				if (!strcmp (node->name, "filter-bar")) {
+				if (!strcmp ((char *)node->name, "filter-bar")) {
 					FilterRule *rule = NULL;
 
 					
@@ -706,7 +707,7 @@
 						
 						rule = filter_rule_new ();
 						if (filter_rule_xml_decode (rule, node, efb->context) != 0) {			
-							gtk_widget_modify_base (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, NULL);
+							gtk_widget_modify_base (E_SEARCH_BAR (efb)->entry, GTK_STATE_NORMAL, NULL);
 							gtk_widget_modify_text (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, NULL);
 							gtk_widget_modify_base (((ESearchBar *)efb)->icon_entry, GTK_STATE_NORMAL, NULL);
 							g_object_unref (rule);
@@ -744,7 +745,7 @@
 					efb->setquery = FALSE;
 					
 					break;
-				} else if (!strcmp (node->name, "search-bar")) {
+				} else if (!strcmp ((char *)node->name, "search-bar")) {
 					int subitem_id, item_id, scope, view_id;
 					char *text;
 					GtkStyle *style = gtk_widget_get_default_style ();
@@ -758,17 +759,17 @@
 
 					esb->block_search = TRUE;
 					if (subitem_id >= 0)
-						e_search_bar_set_ids ((ESearchBar *) efb, item_id, subitem_id);
+						e_search_bar_set_ids (E_SEARCH_BAR (efb), item_id, subitem_id);
 					else
-						e_search_bar_set_item_menu ((ESearchBar *) efb, item_id);
+						e_search_bar_set_item_menu (E_SEARCH_BAR (efb), item_id);
 					esb->block_search = FALSE;
 					view_id = xml_get_prop_int (node, "view_id");
-					e_search_bar_set_viewitem_id ((ESearchBar *) efb, view_id);
+					e_search_bar_set_viewitem_id (E_SEARCH_BAR (efb), view_id);
 					scope = xml_get_prop_int (node, "searchscope");
-					e_search_bar_set_search_scope ((ESearchBar *) efb, scope);
+					e_search_bar_set_search_scope (E_SEARCH_BAR (efb), scope);
 
-					text = xmlGetProp (node, "text");
-					e_search_bar_set_text ((ESearchBar *) efb, text);
+					text = (char *)xmlGetProp (node, (const unsigned char *)"text");
+					e_search_bar_set_text (E_SEARCH_BAR (efb), text);
 					if (text && *text) {
 						efb->current_query = (FilterRule *)efb->option_rules->pdata[item_id - efb->option_base];
 						if (efb->config && efb->current_query)
Index: e-task-widget.c
===================================================================
--- e-task-widget.c	(révision 33572)
+++ e-task-widget.c	(copie de travail)
@@ -124,8 +124,8 @@
 			 const char *information)
 {
 	ETaskWidgetPrivate *priv;
-	GdkPixmap *pixmap;
-	GdkBitmap *mask;
+	/*GdkPixmap *pixmap;
+	GdkBitmap *mask;*/
 	GtkWidget *box;
 	GtkWidget *frame;
 
@@ -156,8 +156,8 @@
 	/* gdk_pixbuf_render_pixmap_and_mask (icon_pixbuf, &pixmap, &mask, 128); */
 
 	priv->image = e_spinner_new ();
-	e_spinner_set_size (priv->image, GTK_ICON_SIZE_SMALL_TOOLBAR);
-	e_spinner_start (priv->image);
+	e_spinner_set_size (E_SPINNER (priv->image), GTK_ICON_SIZE_SMALL_TOOLBAR);
+	e_spinner_start (E_SPINNER (priv->image));
 	/* gtk_image_new_from_pixmap (pixmap, mask); */
 	gtk_widget_show (priv->image);
 	gtk_box_pack_start (GTK_BOX (box), priv->image, FALSE, TRUE, 0);
