diff options
author | Milan Crha <mcrha@redhat.com> | 2009-09-30 16:47:07 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-09-30 16:47:07 +0800 |
commit | ade47751360edc8db48f96e2299aa4247569bb2d (patch) | |
tree | 8cd09a8daf206bea654645da5f8185af0a9509f0 /addressbook | |
parent | 975587643fed081b593bceaa050dba1ae821d888 (diff) | |
download | gsoc2013-evolution-ade47751360edc8db48f96e2299aa4247569bb2d.tar.gz gsoc2013-evolution-ade47751360edc8db48f96e2299aa4247569bb2d.tar.zst gsoc2013-evolution-ade47751360edc8db48f96e2299aa4247569bb2d.zip |
Bug #596800 - Hang on contacts merging
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/gui/merging/eab-contact-merging.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c index b927918d22..0b280a93ed 100644 --- a/addressbook/gui/merging/eab-contact-merging.c +++ b/addressbook/gui/merging/eab-contact-merging.c @@ -228,17 +228,18 @@ mergeit (EContactMergingLookup *lookup) /*Merge only if number of email id's in existing contact is less than 4 */ 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)) { + EContactField use_field = field; row++; - str = (gchar *)e_contact_get_const (lookup->contact, field); + str = (gchar *)e_contact_get_const (lookup->contact, use_field); switch (num_of_email) { case 0: - field = E_CONTACT_EMAIL_1; + use_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))) { - field = E_CONTACT_EMAIL_2; + use_field = E_CONTACT_EMAIL_2; break; } else/*Either the new contact has no email OR the email already exist in the duplicate contact*/ @@ -248,7 +249,7 @@ mergeit (EContactMergingLookup *lookup) 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; + use_field = E_CONTACT_EMAIL_3; break; } else @@ -259,7 +260,7 @@ mergeit (EContactMergingLookup *lookup) (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))) - field = E_CONTACT_EMAIL_4; + use_field = E_CONTACT_EMAIL_4; else continue; } @@ -276,9 +277,9 @@ mergeit (EContactMergingLookup *lookup) gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), ""); gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0); - data->field = field; + data->field = use_field; data->match = lookup->match; - e_contact_set (lookup->match, field, string); + e_contact_set (lookup->match, use_field, string); g_signal_connect (dropdown, "changed", G_CALLBACK(dropdown_changed), data); hbox = gtk_hbox_new (FALSE, 0); |