Commit ab4447bc authored by Milan Crha's avatar Milan Crha

Adapt to libebook API changes

parent ca11c140
......@@ -4449,7 +4449,7 @@ contact_added_cb (EBookClient *book_client,
!error && ce->priv->is_new_contact == FALSE) {
ecs->new_id = g_strdup (id);
e_book_client_remove_contact (
ce->priv->source_client, ce->priv->contact, NULL, contact_removed_cb, ecs);
ce->priv->source_client, ce->priv->contact, E_BOOK_OPERATION_FLAG_NONE, NULL, contact_removed_cb, ecs);
return;
}
......@@ -4556,7 +4556,7 @@ real_save_contact (EContactEditor *ce,
ce->priv->contact, contact_modified_cb, ecs);
else
e_book_client_modify_contact (
ce->priv->target_client, ce->priv->contact, NULL,
ce->priv->target_client, ce->priv->contact, E_BOOK_OPERATION_FLAG_NONE, NULL,
contact_modified_ready_cb, ecs);
}
}
......@@ -5419,12 +5419,12 @@ e_contact_editor_set_property (GObject *object,
e_client_get_backend_property (
E_CLIENT (editor->priv->target_client),
BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS,
E_BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS,
NULL, supported_fields_cb, editor);
e_client_get_backend_property (
E_CLIENT (editor->priv->target_client),
BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS,
E_BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS,
NULL, required_fields_cb, editor);
}
......@@ -5466,12 +5466,12 @@ e_contact_editor_set_property (GObject *object,
e_client_get_backend_property (
E_CLIENT (editor->priv->target_client),
BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS,
E_BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS,
NULL, supported_fields_cb, editor);
e_client_get_backend_property (
E_CLIENT (editor->priv->target_client),
BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS,
E_BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS,
NULL, required_fields_cb, editor);
if (!editor->priv->is_new_contact)
......
......@@ -152,7 +152,8 @@ addressbook_selector_merge_next_cb (EBookClient *book_client,
/* Remove previous contact from source. */
e_book_client_remove_contact (
merge_context->source_client,
merge_context->current_contact, NULL,
merge_context->current_contact,
E_BOOK_OPERATION_FLAG_NONE, NULL,
addressbook_selector_removed_cb, merge_context);
merge_context->pending_removals++;
}
......
......@@ -1439,7 +1439,7 @@ e_addressbook_view_delete_selection (EAddressbookView *view,
/* Remove the cards all at once. */
e_book_client_remove_contacts (
book_client, ids, NULL, remove_contacts_cb, NULL);
book_client, ids, E_BOOK_OPERATION_FLAG_NONE, NULL, remove_contacts_cb, NULL);
g_slist_free (ids);
} else {
......@@ -1448,7 +1448,7 @@ e_addressbook_view_delete_selection (EAddressbookView *view,
/* Remove the card. */
e_book_client_remove_contact (
book_client, contact, NULL,
book_client, contact, E_BOOK_OPERATION_FLAG_NONE, NULL,
remove_contact_cb, NULL);
}
}
......
......@@ -243,11 +243,11 @@ doit (EContactMergingLookup *lookup,
{
if (lookup->op == E_CONTACT_MERGING_ADD) {
if (force_modify)
e_book_client_modify_contact (lookup->book_client, lookup->contact, NULL, modify_contact_ready_cb, lookup);
e_book_client_modify_contact (lookup->book_client, lookup->contact, E_BOOK_OPERATION_FLAG_NONE, NULL, modify_contact_ready_cb, lookup);
else
e_book_client_add_contact (lookup->book_client, lookup->contact, NULL, add_contact_ready_cb, lookup);
e_book_client_add_contact (lookup->book_client, lookup->contact, E_BOOK_OPERATION_FLAG_NONE, NULL, add_contact_ready_cb, lookup);
} else if (lookup->op == E_CONTACT_MERGING_COMMIT)
e_book_client_modify_contact (lookup->book_client, lookup->contact, NULL, modify_contact_ready_cb, lookup);
e_book_client_modify_contact (lookup->book_client, lookup->contact, E_BOOK_OPERATION_FLAG_NONE, NULL, modify_contact_ready_cb, lookup);
}
static void
......@@ -339,7 +339,7 @@ remove_contact_ready_cb (GObject *source_object,
}
e_book_client_add_contact (
book_client, lookup->contact, NULL,
book_client, lookup->contact, E_BOOK_OPERATION_FLAG_NONE, NULL,
add_contact_ready_cb, lookup);
}
......@@ -581,7 +581,7 @@ mergeit (EContactMergingLookup *lookup)
lookup->contact = g_object_ref (lookup->match);
e_book_client_remove_contact (
lookup->book_client,
lookup->match, NULL,
lookup->match, E_BOOK_OPERATION_FLAG_NONE, NULL,
remove_contact_ready_cb, lookup);
value = 1;
break;
......
......@@ -448,7 +448,7 @@ do_delete_from_source (gpointer data,
g_return_if_fail (book_client != NULL);
process->count++;
e_book_client_remove_contact_by_uid (book_client, id, NULL, remove_contact_ready_cb, process);
e_book_client_remove_contact_by_uid (book_client, id, E_BOOK_OPERATION_FLAG_NONE, NULL, remove_contact_ready_cb, process);
}
static void
......
......@@ -730,7 +730,7 @@ csv_import_contacts (gpointer d)
gchar *uid = NULL;
e_book_client_add_contact_sync (
gci->book_client, contact, &uid, NULL, NULL);
gci->book_client, contact, E_BOOK_OPERATION_FLAG_NONE, &uid, NULL, NULL);
if (uid != NULL) {
e_contact_set (contact, E_CONTACT_UID, uid);
g_free (uid);
......
......@@ -507,7 +507,7 @@ ldif_import_contacts (gpointer d)
e_book_client_add_contact_sync (
gci->book_client,
contact, &uid, NULL, NULL);
contact, E_BOOK_OPERATION_FLAG_NONE, &uid, NULL, NULL);
if (uid != NULL) {
e_contact_set (contact, E_CONTACT_UID, uid);
g_free (uid);
......@@ -528,7 +528,7 @@ ldif_import_contacts (gpointer d)
contact = iter->data;
resolve_list_card (gci, contact);
e_book_client_add_contact_sync (
gci->book_client, contact, &uid, NULL, NULL);
gci->book_client, contact, E_BOOK_OPERATION_FLAG_NONE, &uid, NULL, NULL);
if (uid != NULL) {
e_contact_set (contact, E_CONTACT_UID, uid);
g_free (uid);
......
......@@ -214,7 +214,7 @@ vcard_import_contact (VCardImporter *gci,
/* FIXME Error checking */
e_book_client_add_contact_sync (
gci->book_client, contact, &uid, NULL, NULL);
gci->book_client, contact, E_BOOK_OPERATION_FLAG_NONE, &uid, NULL, NULL);
if (uid != NULL) {
e_contact_set (contact, E_CONTACT_UID, uid);
g_free (uid);
......
......@@ -379,7 +379,7 @@ kcontact_load (GSList *files)
}
if (contactlist) {
e_book_client_add_contacts_sync (book_client, contactlist, NULL, NULL, &error);
e_book_client_add_contacts_sync (book_client, contactlist, E_BOOK_OPERATION_FLAG_NONE, NULL, NULL, &error);
if (error) {
printf ("%s: Failed to add contacts: %s\n", G_STRFUNC, error->message);
......
......@@ -149,7 +149,7 @@ import_contact (EBookClient *book_client,
e_contact_set (card, E_CONTACT_NOTE, strings[4]);
e_book_client_add_contact_sync (
book_client, card, &new_uid, NULL, &error);
book_client, card, E_BOOK_OPERATION_FLAG_NONE, &new_uid, NULL, &error);
if (error != NULL) {
g_warning (
......
......@@ -431,7 +431,7 @@ bbdb_do_it (EBookClient *client,
add_email_to_contact (contact, email);
e_book_client_modify_contact_sync (
client_addressbook, contact, NULL, &error);
client_addressbook, contact, E_BOOK_OPERATION_FLAG_NONE, NULL, &error);
if (error != NULL) {
g_warning ("bbdb: Could not modify contact: %s\n", error->message);
......@@ -477,7 +477,7 @@ bbdb_do_it (EBookClient *client,
add_email_to_contact (contact, email);
g_free (temp_name);
e_book_client_add_contact_sync (client, contact, NULL, NULL, &error);
e_book_client_add_contact_sync (client, contact, E_BOOK_OPERATION_FLAG_NONE, NULL, NULL, &error);
if (error != NULL) {
g_warning ("bbdb: Failed to add new contact: %s", error->message);
......
......@@ -266,7 +266,7 @@ bbdb_sync_buddy_list_in_thread (gpointer data)
/* Write it out to the addressbook */
e_book_client_modify_contact_sync (
client, c, NULL, &error);
client, c, E_BOOK_OPERATION_FLAG_NONE, NULL, &error);
if (error != NULL) {
g_warning (
......@@ -289,7 +289,7 @@ bbdb_sync_buddy_list_in_thread (gpointer data)
continue;
}
e_book_client_add_contact_sync (client, c, NULL, NULL, &error);
e_book_client_add_contact_sync (client, c, E_BOOK_OPERATION_FLAG_NONE, NULL, NULL, &error);
if (error != NULL) {
g_warning (
......
......@@ -1644,7 +1644,7 @@ pst_process_contact (PstImporter *m,
g_string_free (notes, TRUE);
e_book_client_add_contact_sync (
m->addressbook, ec, NULL, NULL, &error);
m->addressbook, ec, E_BOOK_OPERATION_FLAG_NONE, NULL, NULL, &error);
g_object_unref (ec);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment