aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/importers
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-09-08 00:31:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-09-08 07:08:54 +0800
commit3da4948c0fc1f2c21b163f0ec456b2d99c881258 (patch)
tree479d6153d31e03cb7a65990683b5271402e5ec29 /addressbook/importers
parent2e5031cb4538b4819e5fce5d717668c3445df80a (diff)
downloadgsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.gz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.bz2
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.lz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.xz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.zst
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.zip
Miscellaneous cleanups.
Diffstat (limited to 'addressbook/importers')
-rw-r--r--addressbook/importers/evolution-csv-importer.c5
-rw-r--r--addressbook/importers/evolution-ldif-importer.c10
-rw-r--r--addressbook/importers/evolution-vcard-importer.c4
3 files changed, 15 insertions, 4 deletions
diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c
index 6d5423e064..fea7e5b5b6 100644
--- a/addressbook/importers/evolution-csv-importer.c
+++ b/addressbook/importers/evolution-csv-importer.c
@@ -726,7 +726,10 @@ csv_import_contacts (gpointer d)
while ((contact = getNextCSVEntry (gci, gci->file))) {
gchar *uid = NULL;
- if (e_book_client_add_contact_sync (gci->book_client, contact, &uid, NULL, NULL) && uid) {
+
+ e_book_client_add_contact_sync (
+ gci->book_client, contact, &uid, NULL, NULL);
+ if (uid != NULL) {
e_contact_set (contact, E_CONTACT_UID, uid);
g_free (uid);
}
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c
index ae8fb5ac95..0d54182e8d 100644
--- a/addressbook/importers/evolution-ldif-importer.c
+++ b/addressbook/importers/evolution-ldif-importer.c
@@ -506,7 +506,11 @@ ldif_import_contacts (gpointer d)
add_to_notes (contact, E_CONTACT_OFFICE);
add_to_notes (contact, E_CONTACT_SPOUSE);
add_to_notes (contact, E_CONTACT_BLOG_URL);
- if (e_book_client_add_contact_sync (gci->book_client, contact, &uid, NULL, NULL) && uid) {
+
+ e_book_client_add_contact_sync (
+ gci->book_client,
+ contact, &uid, NULL, NULL);
+ if (uid != NULL) {
e_contact_set (contact, E_CONTACT_UID, uid);
g_free (uid);
}
@@ -525,7 +529,9 @@ ldif_import_contacts (gpointer d)
contact = iter->data;
resolve_list_card (gci, contact);
- if (e_book_client_add_contact_sync (gci->book_client, contact, &uid, NULL, NULL) && uid) {
+ e_book_client_add_contact_sync (
+ gci->book_client, contact, &uid, NULL, NULL);
+ if (uid != NULL) {
e_contact_set (contact, E_CONTACT_UID, uid);
g_free (uid);
}
diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c
index 09778b5f21..3cef9e6773 100644
--- a/addressbook/importers/evolution-vcard-importer.c
+++ b/addressbook/importers/evolution-vcard-importer.c
@@ -247,7 +247,9 @@ vcard_import_contact (VCardImporter *gci,
add_to_notes (contact, E_CONTACT_BLOG_URL);
/* FIXME Error checking */
- if (e_book_client_add_contact_sync (gci->book_client, contact, &uid, NULL, NULL) && uid) {
+ e_book_client_add_contact_sync (
+ gci->book_client, contact, &uid, NULL, NULL);
+ if (uid != NULL) {
e_contact_set (contact, E_CONTACT_UID, uid);
g_free (uid);
}