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



commit 2a057eace5015b87bee3690c707cf311f2164c85
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 0919df0593..c37af9bad4 100644
--- a/src/addressbook/gui/widgets/eab-contact-merging.c
+++ b/src/addressbook/gui/widgets/eab-contact-merging.c
@@ -553,7 +553,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]