[evolution-data-server/meego-eds] Remove the FILE_AS generation code from e_contact_new_from_vcard
- From: Christophe Dumez <cdumez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/meego-eds] Remove the FILE_AS generation code from e_contact_new_from_vcard
- Date: Wed, 22 Jun 2011 08:11:10 +0000 (UTC)
commit b12f8f14365140e8b788a4c95e9ff71bc596c10f
Author: Christophe Dumez <christophe dumez intel com>
Date: Wed Jun 22 11:10:22 2011 +0300
Remove the FILE_AS generation code from e_contact_new_from_vcard
addressbook/libebook/e-contact.c | 42 --------------------------------------
1 files changed, 0 insertions(+), 42 deletions(-)
---
diff --git a/addressbook/libebook/e-contact.c b/addressbook/libebook/e-contact.c
index e1f8a4a..6a2b39d 100644
--- a/addressbook/libebook/e-contact.c
+++ b/addressbook/libebook/e-contact.c
@@ -1215,53 +1215,11 @@ EContact*
e_contact_new_from_vcard (const gchar *vcard)
{
EContact *contact;
-#if 0
- const gchar *file_as;
-#endif
g_return_val_if_fail (vcard != NULL, NULL);
contact = g_object_new (E_TYPE_CONTACT, NULL);
e_vcard_construct (E_VCARD (contact), vcard);
- /* We need to disable this otherwise the vCard gets parsed */
-#if 0
- /* Generate a FILE_AS field if needed */
-
- file_as = e_contact_get_const (contact, E_CONTACT_FILE_AS);
- if (!file_as || !*file_as) {
- EContactName *name;
- const gchar *org;
- gchar *file_as_new = NULL;
- gchar *strings[4];
- gchar **strings_p = strings;
-
- name = e_contact_get (contact, E_CONTACT_NAME);
- org = e_contact_get_const (contact, E_CONTACT_ORG);
-
- if (name) {
- if (name->family && *name->family)
- *(strings_p++) = name->family;
- if (name->given && *name->given)
- *(strings_p++) = name->given;
-
- if (strings_p != strings) {
- *strings_p = NULL;
- file_as_new = g_strjoinv (", ", strings);
- }
-
- e_contact_name_free (name);
- }
-
- if (!file_as_new && org && *org)
- file_as_new = g_strdup (org);
-
- if (file_as_new) {
- e_contact_set (contact, E_CONTACT_FILE_AS, file_as_new);
- g_free (file_as_new);
- }
- }
-#endif
-
return contact;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]