** Fix for bug #517885
authorMilan Crha <mcrha@redhat.com>
Thu, 21 Feb 2008 15:29:48 +0000 (15:29 +0000)
committerMilan Crha <mcrha@src.gnome.org>
Thu, 21 Feb 2008 15:29:48 +0000 (15:29 +0000)
2008-02-21  Milan Crha  <mcrha@redhat.com>

** Fix for bug #517885

* libebook/e-contact.c: (e_contact_set_property), (e_contact_field_id),
(e_contact_get), (e_contact_get):
* libebook/e-vcard.c: (read_attribute_value),
(e_vcard_to_string_vcard_30), (e_vcard_get_attribute):
Do not compare value/parameter names case sensitively.

svn path=/trunk/; revision=8518

addressbook/ChangeLog
addressbook/libebook/e-contact.c
addressbook/libebook/e-vcard.c

index 3dc651c..5508630 100644 (file)
@@ -1,3 +1,13 @@
+2008-02-21  Milan Crha  <mcrha@redhat.com>
+
+       ** Fix for bug #517885
+       
+       * libebook/e-contact.c: (e_contact_set_property), (e_contact_field_id),
+       (e_contact_get), (e_contact_get):
+       * libebook/e-vcard.c: (read_attribute_value),
+       (e_vcard_to_string_vcard_30), (e_vcard_get_attribute):
+       Do not compare value/parameter names case sensitively.
+
 2008-02-20  Milan Crha  <mcrha@redhat.com>
 
        ** Fix for bug #516474
index c5d6eb5..a26d824 100644 (file)
@@ -801,7 +801,7 @@ e_contact_set_property (GObject *object,
                                else {
                                        /* we didn't find it - add a new attribute */
                                        attr = e_vcard_attribute_new (NULL, info->vcard_field_name);
-                                       if (!strcmp(info->vcard_field_name, "EMAIL") &&
+                                       if (!g_ascii_strcasecmp (info->vcard_field_name, "EMAIL") &&
                                            !info->attr_type1 &&
                                            !info->attr_type2) {
                                                /* Add default type */
@@ -1358,7 +1358,7 @@ e_contact_field_id (const char *field_name)
 {
        int i;
        for (i = E_CONTACT_FIELD_FIRST; i < E_CONTACT_FIELD_LAST; i ++) {
-               if (!strcmp (field_info[i].field_name, field_name))
+               if (!g_ascii_strcasecmp (field_info[i].field_name, field_name))
                        return field_info[i].field_id;
        }
 
@@ -1433,7 +1433,7 @@ e_contact_get (EContact *contact, EContactField field_id)
 
                                name = e_vcard_attribute_get_name (attr);
 
-                               if (!strcmp (name, info->vcard_field_name)) {
+                               if (!g_ascii_strcasecmp (name, info->vcard_field_name)) {
                                        if (num_left-- == 0) {
                                                GList *v = e_vcard_attribute_get_values (attr);
 
@@ -1534,7 +1534,7 @@ e_contact_get (EContact *contact, EContactField field_id)
 
                        name = e_vcard_attribute_get_name (attr);
 
-                       if (!strcmp (name, info->vcard_field_name)) {
+                       if (!g_ascii_strcasecmp (name, info->vcard_field_name)) {
                                GList *v;
                                v = e_vcard_attribute_get_values (attr);
 
index 36c2cdf..3514fa8 100644 (file)
@@ -288,7 +288,7 @@ read_attribute_value (EVCardAttribute *attr, char **p, gboolean quoted_printable
                        lp = g_utf8_next_char(lp);
                }
                else if ((*lp == ';') ||
-                        (*lp == ',' && !strcmp (attr->name, "CATEGORIES"))) {
+                        (*lp == ',' && !g_ascii_strcasecmp (attr->name, "CATEGORIES"))) {
                        e_vcard_attribute_add_value (attr, str->str);
                        g_string_assign (str, "");
                        lp = g_utf8_next_char(lp);
@@ -874,7 +874,7 @@ e_vcard_to_string_vcard_30 (EVCard *evc)
                                /* XXX toshok - i hate you, rfc 2426.
                                   why doesn't CATEGORIES use a ; like
                                   a normal list attribute? */
-                               if (!strcmp (attr->name, "CATEGORIES"))
+                               if (!g_ascii_strcasecmp (attr->name, "CATEGORIES"))
                                        g_string_append_c (attr_str, ',');
                                else
                                        g_string_append_c (attr_str, ';');
@@ -1703,7 +1703,7 @@ e_vcard_get_attribute (EVCard     *evc,
                 EVCardAttribute *attr;
 
                 attr = (EVCardAttribute *) l->data;
-                if (strcmp (attr->name, name) == 0)
+                if (g_ascii_strcasecmp (attr->name, name) == 0)
                         return attr;
         }