[Commits] utils.c 1.10 1.11 utils.h 1.9 1.10

miras at claws-mail.org miras at claws-mail.org
Tue Dec 13 11:56:42 CET 2011


Update of /home/claws-mail/contacts/src
In directory claws-mail:/tmp/cvs-serv22104/src

Modified Files:
	utils.c utils.h 
Log Message:
2011-12-13 [mir]	0.6.0cvs43

	* src/utils.c
	* src/utils.h
	    Remove commented out code which is
	    no longer needed.

Index: utils.c
===================================================================
RCS file: /home/claws-mail/contacts/src/utils.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- utils.c	13 Dec 2011 10:37:14 -0000	1.10
+++ utils.c	13 Dec 2011 10:56:40 -0000	1.11
@@ -1027,23 +1027,7 @@
 	
 	return base64;
 }
-/*
-gchar* base64_encode_pixbuf(GdkPixbuf* pixbuf) {
-	int width, n_channels, bits_per_sample;
-	guchar* pixels;
-	gchar* base64;
-	gsize length;
-	
-	n_channels = gdk_pixbuf_get_n_channels(pixbuf);
-	width = gdk_pixbuf_get_width(pixbuf);
-	pixels = gdk_pixbuf_get_pixels(pixbuf);
-	bits_per_sample = gdk_pixbuf_get_bits_per_sample(pixbuf);
-	length = width * ((n_channels * bits_per_sample + 7) / 8);
-	base64 = g_base64_encode(pixels, length);
-	
-	return base64;
-}
-*/
+
 guint set_log_handler() {
 	guint id;
 	
@@ -1949,48 +1933,16 @@
 		}
 	}
 	
-	//emaila = g_slist_sort(a->emails, email_sort);
-	//emailb = g_slist_sort(b->emails, email_sort);
-	
-	//cura = a->emails/*emaila*/;
-	cur = b->emails/*emailb*/;
-	while (cur/*a && curb*/) {
-		//if (! email_equal(cura->data, curb->data)) {
-			c = g_new0(ContactChange, 1);
-			c->action = ATTRIBUTE_MODIFY;
-			c->type = CONTACT_CHANGE_EMAIL;
-			c->key = g_strdup(((Email *) cur->data)->email);
-			c->value = (gpointer) email_copy(cur->data);
-			diff = g_slist_prepend(diff, c);
-		//}
+	cur = b->emails;
+	while (cur) {
+		c = g_new0(ContactChange, 1);
+		c->action = ATTRIBUTE_MODIFY;
+		c->type = CONTACT_CHANGE_EMAIL;
+		c->key = g_strdup(((Email *) cur->data)->email);
+		c->value = (gpointer) email_copy(cur->data);
+		diff = g_slist_prepend(diff, c);
 		cur = cur->next;
-		//curb = curb->next;
 	}
-/*	while (cura) {
-		if (! g_slist_find_custom(diff,	(Email *) cura->data, diff_list_find)) {
-			c = g_new0(ContactChange, 1);
-			c->action = ATTRIBUTE_DELETE;
-			c->type = CONTACT_CHANGE_EMAIL;
-			c->key = g_strdup(((Email *) cura->data)->email);
-			c->value = (gpointer) email_copy(cura->data);
-			diff = g_slist_prepend(diff, c);
-		}
-		cura = cura->next;
-	}	
-	while (curb) {
-		if (! g_slist_find_custom(diff,	(Email *) curb->data, diff_list_find)) {
-			c = g_new0(ContactChange, 1);
-			c->action = ATTRIBUTE_ADD;
-			c->type = CONTACT_CHANGE_EMAIL;
-			c->key = g_strdup(((Email *) curb->data)->email);
-			c->value = (gpointer) email_copy(curb->data);
-			diff = g_slist_prepend(diff, c);
-		}
-		curb = curb->next;
-	}*/
-		
-	//gslist_free(&emaila, NULL);
-	//gslist_free(&emailb, NULL);
 
 	return diff;
 }
@@ -2131,20 +2083,10 @@
 	guchar* image_buf;
 	GError *err = NULL;
 	gsize len;
-/*	gint len1 = 0;
-	guint len2 = 0;
-	pl = gdk_pixbuf_loader_new_with_type("jpeg", &err);
-	if (err) {
-		g_critical("Init: %s", err->message);
-		g_clear_error(&err);
-		return NULL;
-	}*/
+
 	image_buf = g_new0(guchar, length * 3 / 4 );
-	//image_buf = g_base64_decode((gchar *) jpeg, &len);
-	//g_base64_decode_step((gchar *) jpeg, length, image_buf, &len1, &len2);
 	pl = gdk_pixbuf_loader_new();
 
-	//gdk_pixbuf_loader_write(pl, image_buf, length, &err);
 	gdk_pixbuf_loader_write(pl, jpeg, length, &err); 
 	g_free(image_buf);
 	if (err) {

Index: utils.h
===================================================================
RCS file: /home/claws-mail/contacts/src/utils.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- utils.h	13 Dec 2011 10:37:14 -0000	1.9
+++ utils.h	13 Dec 2011 10:56:40 -0000	1.10
@@ -145,7 +145,6 @@
 gint address_book_compare(gconstpointer a, gconstpointer b);
 gboolean xor(const gchar* a, const gchar* b);
 gchar* base64_encode_data(const gchar* path);
-//gchar* base64_encode_pixbuf(GdkPixbuf* pixbuf);
 guint set_log_handler();
 gint utf8_collate(gchar* s1, gchar* s2);
 gboolean attribute_supported(Plugin* plugin, const gchar* attribute);



More information about the Commits mailing list