if (OSSO_ABOOK_IS_CONTACT (contact)) {
osso_abook_contact_commit(OSSO_ABOOK_CONTACT(contact), is_new, book, NULL);
} else {
- if (is_new)
- e_book_add_contact (book, contact, NULL);
- else
- e_book_commit_contact (book, contact, NULL);
+ GError *err = NULL;
+ if (is_new) {
+ if (!e_book_add_contact (book, contact, &err)) {
+ g_warning ("Failed to add contact: %s", err->message);
+ g_error_free (err);
+ }
+ } else {
+ if (!e_book_commit_contact (book, contact, &err)) {
+ g_warning ("Failed to commit contact: %s", err->message);
+ g_error_free (err);
+ }
+ }
}
#endif /* MODEST_ABOOK_API < 2 */
}
gchar *message = g_strdup_printf(
_CS("ckdg_ib_illegal_characters_entered"),
char_in_string);
+ g_free (char_in_string);
hildon_banner_show_information (
add_email_addr_to_contact_dlg, NULL, message );
g_free (message);
err ? err->message : "<unknown>");
if (err)
g_error_free (err);
+ g_free (email);
+ e_book_query_unref (query);
return FALSE;
}
e_book_query_unref (query);
clean_check_names_banner (info);
return FALSE;
}
- hide_check_names_banner (info);
resolved_contacts = get_contacts_for_name (address);
+ hide_check_names_banner (info);
if (resolved_contacts == NULL) {
/* no matching contacts for the search string */
err ? err->message : "<unknown>");
if (err)
g_error_free (err);
+ g_free (email);
+ e_book_query_unref (query);
return FALSE;
}
e_book_query_unref (query);