BOOLEAN_FIELD (E_CONTACT_WANTS_HTML, EVC_X_WANTS_HTML, "wants_html", N_("Wants HTML Mail"), FALSE),
/* Instant messaging fields */
- LIST_FIELD (E_CONTACT_IM_AIM, EVC_X_AIM, "im_aim", N_("AIM Screen Name List"), FALSE),
- LIST_FIELD (E_CONTACT_IM_JABBER, EVC_X_JABBER, "im_jabber", N_("Jabber Id List"), FALSE),
- LIST_FIELD (E_CONTACT_IM_YAHOO, EVC_X_YAHOO, "im_yahoo", N_("Yahoo! Screen Name List"), FALSE),
- LIST_FIELD (E_CONTACT_IM_MSN, EVC_X_MSN, "im_msn", N_("MSN Screen Name List"), FALSE),
- LIST_FIELD (E_CONTACT_IM_ICQ, EVC_X_ICQ, "im_icq", N_("ICQ Id List"), FALSE),
+ MULTI_LIST_FIELD (E_CONTACT_IM_AIM, EVC_X_AIM, "im_aim", N_("AIM Screen Name List"), FALSE),
+ MULTI_LIST_FIELD (E_CONTACT_IM_JABBER, EVC_X_JABBER, "im_jabber", N_("Jabber Id List"), FALSE),
+ MULTI_LIST_FIELD (E_CONTACT_IM_YAHOO, EVC_X_YAHOO, "im_yahoo", N_("Yahoo! Screen Name List"), FALSE),
+ MULTI_LIST_FIELD (E_CONTACT_IM_MSN, EVC_X_MSN, "im_msn", N_("MSN Screen Name List"), FALSE),
+ MULTI_LIST_FIELD (E_CONTACT_IM_ICQ, EVC_X_ICQ, "im_icq", N_("ICQ Id List"), FALSE),
+
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_AIM_HOME_1, EVC_X_AIM, "im_aim_home_1", N_("AIM Home Screen Name 1"), FALSE, "HOME", 0),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_AIM_HOME_2, EVC_X_AIM, "im_aim_home_2", N_("AIM Home Screen Name 2"), FALSE, "HOME", 1),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_AIM_HOME_3, EVC_X_AIM, "im_aim_home_3", N_("AIM Home Screen Name 3"), FALSE, "HOME", 2),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_AIM_WORK_1, EVC_X_AIM, "im_aim_work_1", N_("AIM Work Screen Name 1"), FALSE, "WORK", 0),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_AIM_WORK_2, EVC_X_AIM, "im_aim_work_2", N_("AIM Work Screen Name 2"), FALSE, "WORK", 1),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_AIM_WORK_3, EVC_X_AIM, "im_aim_work_3", N_("AIM Work Screen Name 3"), FALSE, "WORK", 2),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_JABBER_HOME_1, EVC_X_JABBER, "im_jabber_home_1", N_("Jabber Home Id 1"), FALSE, "HOME", 0),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_JABBER_HOME_2, EVC_X_JABBER, "im_jabber_home_2", N_("Jabber Home Id 2"), FALSE, "HOME", 1),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_JABBER_HOME_3, EVC_X_JABBER, "im_jabber_home_3", N_("Jabber Home Id 3"), FALSE, "HOME", 2),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_JABBER_WORK_1, EVC_X_JABBER, "im_jabber_work_1", N_("Jabber Work Id 1"), FALSE, "WORK", 0),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_JABBER_WORK_2, EVC_X_JABBER, "im_jabber_work_3", N_("Jabber Work Id 2"), FALSE, "WORK", 1),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_JABBER_WORK_3, EVC_X_JABBER, "im_jabber_work_2", N_("Jabber Work Id 3"), FALSE, "WORK", 2),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_YAHOO_HOME_1, EVC_X_YAHOO, "im_yahoo_home_1", N_("Yahoo! Home Screen Name 1"), FALSE, "HOME", 0),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_YAHOO_HOME_2, EVC_X_YAHOO, "im_yahoo_home_2", N_("Yahoo! Home Screen Name 2"), FALSE, "HOME", 1),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_YAHOO_HOME_3, EVC_X_YAHOO, "im_yahoo_home_3", N_("Yahoo! Home Screen Name 3"), FALSE, "HOME", 2),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_YAHOO_WORK_1, EVC_X_YAHOO, "im_yahoo_work_1", N_("Yahoo! Work Screen Name 1"), FALSE, "WORK", 0),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_YAHOO_WORK_2, EVC_X_YAHOO, "im_yahoo_work_2", N_("Yahoo! Work Screen Name 2"), FALSE, "WORK", 1),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_YAHOO_WORK_3, EVC_X_YAHOO, "im_yahoo_work_3", N_("Yahoo! Work Screen Name 3"), FALSE, "WORK", 2),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_MSN_HOME_1, EVC_X_MSN, "im_msn_home_1", N_("MSN Home Screen Name 1"), FALSE, "HOME", 0),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_MSN_HOME_2, EVC_X_MSN, "im_msn_home_2", N_("MSN Home Screen Name 2"), FALSE, "HOME", 1),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_MSN_HOME_3, EVC_X_MSN, "im_msn_home_3", N_("MSN Home Screen Name 3"), FALSE, "HOME", 2),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_MSN_WORK_1, EVC_X_MSN, "im_msn_work_1", N_("MSN Work Screen Name 1"), FALSE, "WORK", 0),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_MSN_WORK_2, EVC_X_MSN, "im_msn_work_2", N_("MSN Work Screen Name 2"), FALSE, "WORK", 1),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_MSN_WORK_3, EVC_X_MSN, "im_msn_work_3", N_("MSN Work Screen Name 3"), FALSE, "WORK", 2),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_ICQ_HOME_1, EVC_X_ICQ, "im_icq_home_1", N_("ICQ Home Id 1"), FALSE, "HOME", 0),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_ICQ_HOME_2, EVC_X_ICQ, "im_icq_home_2", N_("ICQ Home Id 2"), FALSE, "HOME", 1),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_ICQ_HOME_3, EVC_X_ICQ, "im_icq_home_3", N_("ICQ Home Id 3"), FALSE, "HOME", 2),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_ICQ_WORK_1, EVC_X_ICQ, "im_icq_work_1", N_("ICQ Work Id 1"), FALSE, "WORK", 0),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_ICQ_WORK_2, EVC_X_ICQ, "im_icq_work_2", N_("ICQ Work Id 2"), FALSE, "WORK", 1),
+ ATTR_TYPE_STR_FIELD (E_CONTACT_IM_ICQ_WORK_3, EVC_X_ICQ, "im_icq_work_3", N_("ICQ Work Id 3"), FALSE, "WORK", 2),
/* Organizational fields */
LIST_ELEM_STR_FIELD (E_CONTACT_ORG, EVC_ORG, "org", N_("Organization"), FALSE, 0),
g_value_get_string (value));
}
}
+ else if (info->t & E_CONTACT_FIELD_TYPE_LIST) {
+ EVCardAttribute *attr;
+ GList *values, *l;
+
+ values = g_value_get_pointer (value);
+
+ attr = e_contact_get_first_attr (contact, info->vcard_field_name);
+
+ if (attr) {
+ e_vcard_attribute_remove_values (attr);
+
+ if (!values)
+ e_vcard_remove_attribute (E_VCARD (contact), attr);
+ }
+ else if (values) {
+ attr = e_vcard_attribute_new (NULL, info->vcard_field_name);
+ e_vcard_add_attribute (E_VCARD (contact), attr);
+ }
+
+ for (l = values; l != NULL; l = l->next)
+ e_vcard_attribute_add_value (attr, l->data);
+ }
else {
g_warning ("unhandled attribute `%s'", info->vcard_field_name);
}
E_CONTACT_IM_MSN, /* Multi-valued */
E_CONTACT_IM_ICQ, /* Multi-valued */
+ E_CONTACT_IM_AIM_HOME_1, /* Synthetic string field */
+ E_CONTACT_IM_AIM_HOME_2, /* Synthetic string field */
+ E_CONTACT_IM_AIM_HOME_3, /* Synthetic string field */
+ E_CONTACT_IM_AIM_WORK_1, /* Synthetic string field */
+ E_CONTACT_IM_AIM_WORK_2, /* Synthetic string field */
+ E_CONTACT_IM_AIM_WORK_3, /* Synthetic string field */
+ E_CONTACT_IM_JABBER_HOME_1, /* Synthetic string field */
+ E_CONTACT_IM_JABBER_HOME_2, /* Synthetic string field */
+ E_CONTACT_IM_JABBER_HOME_3, /* Synthetic string field */
+ E_CONTACT_IM_JABBER_WORK_1, /* Synthetic string field */
+ E_CONTACT_IM_JABBER_WORK_2, /* Synthetic string field */
+ E_CONTACT_IM_JABBER_WORK_3, /* Synthetic string field */
+ E_CONTACT_IM_YAHOO_HOME_1, /* Synthetic string field */
+ E_CONTACT_IM_YAHOO_HOME_2, /* Synthetic string field */
+ E_CONTACT_IM_YAHOO_HOME_3, /* Synthetic string field */
+ E_CONTACT_IM_YAHOO_WORK_1, /* Synthetic string field */
+ E_CONTACT_IM_YAHOO_WORK_2, /* Synthetic string field */
+ E_CONTACT_IM_YAHOO_WORK_3, /* Synthetic string field */
+ E_CONTACT_IM_MSN_HOME_1, /* Synthetic string field */
+ E_CONTACT_IM_MSN_HOME_2, /* Synthetic string field */
+ E_CONTACT_IM_MSN_HOME_3, /* Synthetic string field */
+ E_CONTACT_IM_MSN_WORK_1, /* Synthetic string field */
+ E_CONTACT_IM_MSN_WORK_2, /* Synthetic string field */
+ E_CONTACT_IM_MSN_WORK_3, /* Synthetic string field */
+ E_CONTACT_IM_ICQ_HOME_1, /* Synthetic string field */
+ E_CONTACT_IM_ICQ_HOME_2, /* Synthetic string field */
+ E_CONTACT_IM_ICQ_HOME_3, /* Synthetic string field */
+ E_CONTACT_IM_ICQ_WORK_1, /* Synthetic string field */
+ E_CONTACT_IM_ICQ_WORK_2, /* Synthetic string field */
+ E_CONTACT_IM_ICQ_WORK_3, /* Synthetic string field */
+
/* Address fields */
E_CONTACT_ADDRESS, /* Multi-valued structured (EContactAddress) */
E_CONTACT_ADDRESS_HOME, /* synthetic structured field (EContactAddress) */