2011-12-13 [mir] 0.6.0cvs43
authorMichael Rasmussen <mir@datanom.net>
Tue, 13 Dec 2011 10:56:40 +0000 (10:56 +0000)
committerMichael Rasmussen <mir@datanom.net>
Tue, 13 Dec 2011 10:56:40 +0000 (10:56 +0000)
* src/utils.c
* src/utils.h
    Remove commented out code which is
    no longer needed.

ChangeLog
PATCHSETS
configure.ac
src/utils.c
src/utils.h

index bc6d79c2b85707f6347399e70935262cb2524dea..1bc6cb524230cfaa120431dfacc6b2cf592cb175 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-12-13 [mir]       0.6.0cvs43
+
+       * src/utils.c
+       * src/utils.h
+           Remove commented out code which is
+           no longer needed.
+
 2011-12-13 [mir]       0.6.0cvs42
 
        * extensions/example/src/example-extension.c
index 4d27651dd8defb44e91957279f782e647454d2e7..e4056cdbfa37d15f547f2431a67d19ec455bbdd7 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
@@ -40,3 +40,4 @@
 ( cvs diff -u -r 1.12 -r 1.13 plugins/ldap/ldap-plugin.c;  cvs diff -u -r 1.9 -r 1.10 src/utils.c;  cvs diff -u -r 1.8 -r 1.9 src/utils.h;  ) > 0.6.0cvs40.patchset
 ( cvs diff -u -r 1.2 -r 1.3 src/extension-loader.c;  ) > 0.6.0cvs41.patchset
 ( cvs diff -u -r 1.2 -r 1.3 extensions/example/src/example-extension.c;  ) > 0.6.0cvs42.patchset
+( cvs diff -u -r 1.10 -r 1.11 src/utils.c;  cvs diff -u -r 1.9 -r 1.10 src/utils.h;  ) > 0.6.0cvs43.patchset
index b3fe466c32245047658369f19d8f9d0c53a41389..f9f1d060531f6550c8299dfc146c6d932f4d018a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=6
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=42
+EXTRA_VERSION=43
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 68c6131e26da1a509257932ae6c58bd931b4fbdf..b9bedfff13e6c1282450ea0daa9e1dbb830e1567 100644 (file)
@@ -1027,23 +1027,7 @@ gchar* base64_encode_data(const gchar* path) {
        
        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 @@ GSList* contact_diff(const Contact* a, const Contact* b) {
                }
        }
        
-       //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 @@ gchar* jpeg_to_png_base64(guchar* jpeg, gsize length) {
        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 2070bef402a63731713fa68a14a1e84e50e246ff..da927505b231b9d6fc2e3edcc6576a06186ca5c1 100644 (file)
@@ -145,7 +145,6 @@ void address_book_free(AddressBook** address_book);
 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);