diff options
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 420c5aa6ee..8a7c92e371 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -407,10 +407,9 @@ edit_im_clicked(GtkWidget *widget, EContactEditor *editor) NULL); if (service == old_service && - (location == old_location || - (location != NULL && old_location == NULL) || - (location == NULL && old_location != NULL) || - !strcmp(old_location, location)) && + ((!location && !old_location) || + (location && old_location && + !strcmp(old_location, location))) && !strcmp(screenname, old_screenname)) { gtk_widget_destroy(GTK_WIDGET(dialog)); @@ -426,7 +425,8 @@ edit_im_clicked(GtkWidget *widget, EContactEditor *editor) if (!found && !strcmp(e_vcard_attribute_get_value (attr), old_screenname) - && e_vcard_attribute_has_type (attr, old_location)) { + && ((old_location && e_vcard_attribute_has_type (attr, old_location)) + || (!old_location && !e_vcard_attribute_has_type (attr, "HOME") && !e_vcard_attribute_has_type (attr, "WORK")))) { e_vcard_attribute_free (attr); found = TRUE; } |