present. Fixes #268271.
2005-05-06 Sushma Rai <rsushma@novell.com>
+ * libebook/e-vcard.c (e_vcard_attribute_add_param): Handling encoding
+ type BASE64.
+
+ * libebook/e-contact.c (n_getter): If FN attribute is not present,
+ forming FN value from N and adding it to the vcard.
+ Fixes #268271
+
+2005-05-06 Sushma Rai <rsushma@novell.com>
+
* libedata-book/e-book-backend-cache.c
(e_book_backend_cache_get_contacts): Freeing the list of cache objects
and sexp.
n_getter (EContact *contact, EVCardAttribute *attr)
{
EContactName *name = g_new0 (EContactName, 1);
+ EVCardAttribute *new_attr;
+ char *name_str;
+
if (attr) {
GList *p = e_vcard_attribute_get_values (attr);
name->suffixes = g_strdup (p && p->data ? p->data : "");
}
+ new_attr = e_contact_get_first_attr (contact, EVC_FN);
+ if (!new_attr) {
+ new_attr = e_vcard_attribute_new (NULL, EVC_FN);
+ e_vcard_add_attribute (E_VCARD (contact), new_attr);
+ name_str = e_contact_name_to_string (name);
+ e_vcard_attribute_add_value (new_attr, name_str);
+ g_free (name_str);
+ }
+
return name;
}
}
if (param->values && param->values->data) {
- if (!g_ascii_strcasecmp ((char*)param->values->data, "b"))
+ if (!g_ascii_strcasecmp ((char*)param->values->data, "b") ||
+ !g_ascii_strcasecmp ((char*)param->values->data, "BASE64"))
attr->encoding = EVC_ENCODING_BASE64;
else if (!g_ascii_strcasecmp ((char*)param->values->data, EVC_QUOTEDPRINTABLE))
attr->encoding = EVC_ENCODING_QP;