[evolution] I#1564 - Contacts: Prefer original value only when filled on contact merge



commit cdfedff55b16c711d729ab8cb67dc7750eb94ef2
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jul 28 12:45:04 2021 +0200

    I#1564 - Contacts: Prefer original value only when filled on contact merge
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1564

 src/addressbook/gui/widgets/eab-contact-merging.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/addressbook/gui/widgets/eab-contact-merging.c 
b/src/addressbook/gui/widgets/eab-contact-merging.c
index 535fb4536d..49ee00382b 100644
--- a/src/addressbook/gui/widgets/eab-contact-merging.c
+++ b/src/addressbook/gui/widgets/eab-contact-merging.c
@@ -558,7 +558,12 @@ merge_dialog_data_create (EContactMergingLookup *lookup,
                                        G_CALLBACK (dropdown_changed), data);
                                g_object_set_data_full (G_OBJECT (dropdown), 
"eab-contact-merging::dropdown-data", data, g_free);
 
-                               if (field == E_CONTACT_NICKNAME || field == E_CONTACT_GIVEN_NAME || field == 
E_CONTACT_FAMILY_NAME || field == E_CONTACT_FULL_NAME)
+                               /* Only prefer the original value when it's filled */
+                               if (string1 && *string1 && (
+                                   field == E_CONTACT_NICKNAME ||
+                                   field == E_CONTACT_GIVEN_NAME ||
+                                   field == E_CONTACT_FAMILY_NAME ||
+                                   field == E_CONTACT_FULL_NAME))
                                        gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 1);
                                else
                                        gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]