aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/importers
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-11-10 11:40:00 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-11-11 04:54:43 +0800
commit2c4ae5e7685c462f8d464448e4617b8dea029e72 (patch)
treec34f0cbb7c500ff70f10fce846631b0a948b341c /addressbook/importers
parent583da46b8caf4b2a8b548b03c38fe0e84164abfb (diff)
downloadgsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.tar.gz
gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.tar.zst
gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'addressbook/importers')
-rw-r--r--addressbook/importers/evolution-ldif-importer.c15
-rw-r--r--addressbook/importers/evolution-vcard-importer.c36
2 files changed, 29 insertions, 22 deletions
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c
index 3adf2afe4f..c95b2f4357 100644
--- a/addressbook/importers/evolution-ldif-importer.c
+++ b/addressbook/importers/evolution-ldif-importer.c
@@ -257,7 +257,7 @@ parseLine (GHashTable *dn_contact_hash,
return FALSE;
}
- colon = (gchar *) strchr ( ptr, ':' );
+ colon = (gchar *) strchr (ptr, ':');
if (colon) {
gint i;
@@ -266,7 +266,7 @@ parseLine (GHashTable *dn_contact_hash,
while (isspace (*value))
value++;
- ldif_value = getValue (&value );
+ ldif_value = getValue (&value);
field_handled = FALSE;
for (i = 0; i < G_N_ELEMENTS (ldif_fields); i++) {
@@ -475,11 +475,12 @@ add_to_notes (EContact *contact,
if (!field_text || !*field_text)
return;
- new_text = g_strdup_printf ("%s%s%s: %s",
- old_text ? old_text : "",
- old_text && *old_text &&
- *(old_text + strlen (old_text) - 1) != '\n' ? "\n" : "",
- e_contact_pretty_name (field), field_text);
+ new_text = g_strdup_printf (
+ "%s%s%s: %s",
+ old_text ? old_text : "",
+ old_text && *old_text &&
+ *(old_text + strlen (old_text) - 1) != '\n' ? "\n" : "",
+ e_contact_pretty_name (field), field_text);
e_contact_set (contact, E_CONTACT_NOTE, new_text);
g_free (new_text);
}
diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c
index 2e452c24ad..d430bd24eb 100644
--- a/addressbook/importers/evolution-vcard-importer.c
+++ b/addressbook/importers/evolution-vcard-importer.c
@@ -95,11 +95,12 @@ add_to_notes (EContact *contact,
if (!field_text || !*field_text)
return;
- new_text = g_strdup_printf ("%s%s%s: %s",
- old_text ? old_text : "",
- old_text && *old_text &&
- *(old_text + strlen (old_text) - 1) != '\n' ? "\n" : "",
- e_contact_pretty_name (field), field_text);
+ new_text = g_strdup_printf (
+ "%s%s%s: %s",
+ old_text ? old_text : "",
+ old_text && *old_text &&
+ *(old_text + strlen (old_text) - 1) != '\n' ? "\n" : "",
+ e_contact_pretty_name (field), field_text);
e_contact_set (contact, E_CONTACT_NOTE, new_text);
g_free (new_text);
}
@@ -191,15 +192,17 @@ vcard_import_contact (VCardImporter *gci,
* the rest should be kept as is */
if (location_only) {
/* add VOICE */
- e_vcard_attribute_add_param_with_value (a,
- e_vcard_attribute_param_new (EVC_TYPE),
- "VOICE");
+ e_vcard_attribute_add_param_with_value (
+ a,
+ e_vcard_attribute_param_new (EVC_TYPE),
+ "VOICE");
}
if (no_location) {
/* add OTHER */
- e_vcard_attribute_add_param_with_value (a,
- e_vcard_attribute_param_new (EVC_TYPE),
- "OTHER");
+ e_vcard_attribute_add_param_with_value (
+ a,
+ e_vcard_attribute_param_new (EVC_TYPE),
+ "OTHER");
}
}
}
@@ -235,7 +238,8 @@ vcard_import_contact (VCardImporter *gci,
if (no_location) {
/* add OTHER */
- e_vcard_attribute_add_param_with_value (a,
+ e_vcard_attribute_add_param_with_value (
+ a,
e_vcard_attribute_param_new (EVC_TYPE),
"OTHER");
}
@@ -977,10 +981,11 @@ evolution_contact_importer_get_preview_widget (const GSList *contacts)
}
gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter,
+ gtk_list_store_set (
+ store, &iter,
0, description ? description : "",
1, contact,
- -1 );
+ -1);
g_free (free_description);
}
@@ -999,7 +1004,8 @@ evolution_contact_importer_get_preview_widget (const GSList *contacts)
gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (store));
g_object_unref (store);
- gtk_tree_view_insert_column_with_attributes (tree_view, -1, _("Contact"),
+ gtk_tree_view_insert_column_with_attributes (
+ tree_view, -1, _("Contact"),
gtk_cell_renderer_text_new (), "text", 0, NULL);
if (gtk_tree_model_iter_n_children (GTK_TREE_MODEL (store), NULL) > 1)