aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/merging
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-19 02:05:05 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-19 02:05:38 +0800
commitdcf2c0e754d6e251733cea74c2427738122620af (patch)
tree358d2c639c2a5b5cf5fc8f28c515076f8b4d4e5d /addressbook/gui/merging
parent76fc1247ba88575c0f6e0040672e19e66f53da4f (diff)
downloadgsoc2013-evolution-dcf2c0e754d6e251733cea74c2427738122620af.tar.gz
gsoc2013-evolution-dcf2c0e754d6e251733cea74c2427738122620af.tar.zst
gsoc2013-evolution-dcf2c0e754d6e251733cea74c2427738122620af.zip
More whitespace cleanup.
Diffstat (limited to 'addressbook/gui/merging')
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c10
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c24
2 files changed, 17 insertions, 17 deletions
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index 1e219f0ceb..236c6acd0c 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -86,7 +86,7 @@ name_fragment_match_with_synonyms (const gchar *a, const gchar *b, gboolean stri
if (!(a && b && *a && *b))
return FALSE;
- if(!e_utf8_casefold_collate (a, b))
+ if (!e_utf8_casefold_collate (a, b))
return TRUE;
/* Check for nicknames. Yes, the linear search blows. */
@@ -425,7 +425,7 @@ match_email_hostname (const gchar *addr1, const gchar *addr2)
--addr1;
--addr2;
}
- if((*addr1 == '@' && *addr2 != '@' ) || (*addr2 == '@' && *addr1 != '@'))
+ if ((*addr1 == '@' && *addr2 != '@' ) || (*addr2 == '@' && *addr1 != '@'))
return FALSE;
return TRUE;
@@ -526,10 +526,10 @@ eab_contact_compare (EContact *contact1, EContact *contact2)
g_return_val_if_fail (contact2 && E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE);
result = EAB_CONTACT_MATCH_NONE;
- if(!e_contact_get (contact1, E_CONTACT_IS_LIST)){
+ if (!e_contact_get (contact1, E_CONTACT_IS_LIST)) {
result = combine_comparisons (result, eab_contact_compare_name (contact1, contact2));
result = combine_comparisons (result, eab_contact_compare_nickname (contact1, contact2));
- if(!e_contact_get (contact2, E_CONTACT_IS_LIST))
+ if (!e_contact_get (contact2, E_CONTACT_IS_LIST))
result = combine_comparisons (result, eab_contact_compare_email (contact1, contact2));
result = combine_comparisons (result, eab_contact_compare_address (contact1, contact2));
result = combine_comparisons (result, eab_contact_compare_telephone (contact1, contact2));
@@ -691,7 +691,7 @@ use_common_book_cb (EBook *book, gpointer closure)
/* Build up our full query from the parts. */
query_parts[p] = NULL;
qj = g_strjoinv (" ", query_parts);
- for(i = 0; query_parts[i] != NULL; i++)
+ for (i = 0; query_parts[i] != NULL; i++)
g_free(query_parts[i]);
if (p > 1) {
gchar *s;
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
index 2b62299b65..aabea67bdb 100644
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ b/addressbook/gui/merging/eab-contact-merging.c
@@ -102,7 +102,7 @@ free_lookup (EContactMergingLookup *lookup)
g_object_unref (lookup->book);
g_object_unref (lookup->contact);
g_list_free (lookup->avoid);
- if(lookup->match)
+ if (lookup->match)
g_object_unref (lookup->match);
g_free (lookup);
}
@@ -217,7 +217,7 @@ mergeit (EContactMergingLookup *lookup)
num_of_email = g_list_length (email_attr_list);
/*we match all the string fields of the already existing contact and the new contact.*/
- for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) {
+ for (field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) {
dropdown_data *data = NULL;
string = (gchar *)e_contact_get_const (lookup->contact, field);
string1 = (gchar *)e_contact_get_const (lookup->match, field);
@@ -230,14 +230,14 @@ mergeit (EContactMergingLookup *lookup)
|| field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email < 4)) {
row++;
str = (gchar *)e_contact_get_const (lookup->contact, field);
- switch(num_of_email)
+ switch (num_of_email)
{
case 0:
field = E_CONTACT_EMAIL_1;
break;
case 1:
/*New contact has email that is NOT equal to email in duplicate contact*/
- if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str))) {
+ if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str))) {
field = E_CONTACT_EMAIL_2;
break;
}
@@ -245,7 +245,7 @@ mergeit (EContactMergingLookup *lookup)
continue;
case 2:
/*New contact has email and it is equal to neither of the 2 emails in the duplicate contact*/
- if((str && *str) &&
+ if ((str && *str) &&
(g_ascii_strcasecmp(str,e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1))) &&
(g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str))) {
field = E_CONTACT_EMAIL_3;
@@ -255,7 +255,7 @@ mergeit (EContactMergingLookup *lookup)
continue;
case 3:
/*New contact has email and it is equal to none of the 3 emails in the duplicate contact*/
- if((str && *str) &&
+ if ((str && *str) &&
(g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str)) &&
(g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str)) &&
(g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_3),str)))
@@ -302,7 +302,7 @@ mergeit (EContactMergingLookup *lookup)
}
/*for all string fields except name and email*/
- if(!(string1 && *string1) || (g_ascii_strcasecmp(string, string1))) {
+ if (!(string1 && *string1) || (g_ascii_strcasecmp(string, string1))) {
row++;
label = gtk_label_new (e_contact_pretty_name(field));
hbox = gtk_hbox_new (FALSE, 0);
@@ -368,26 +368,26 @@ check_if_same (EContact *contact, EContact *match)
gint num_of_email;
gchar *str = NULL, *string = NULL, *string1 = NULL;
- for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) {
+ for (field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) {
email_attr_list = e_contact_get_attributes (match, E_CONTACT_EMAIL);
num_of_email = g_list_length (email_attr_list);
if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2
|| field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email<4)) {
str = (gchar *)e_contact_get_const (contact, field);
- switch(num_of_email)
+ switch (num_of_email)
{
case 0:
return FALSE;
case 1:
- if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)))
+ if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)))
return FALSE;
case 2:
- if((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) &&
+ if ((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) &&
(g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str)))
return FALSE;
case 3:
- if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) &&
+ if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) &&
(g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str)) &&
(g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_3),str)))
return FALSE;