[evolution/wip/webkit2] Bug 733518 - Make VOICE type optional for TEL in EContact



commit 5378ad2db26d8d36582b1c9757acac7a02da0466
Author: Milan Crha <mcrha redhat com>
Date:   Fri Nov 21 11:12:21 2014 +0100

    Bug 733518 - Make VOICE type optional for TEL in EContact

 addressbook/util/eab-book-util.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
index 9eadb44..18c7ec0 100644
--- a/addressbook/util/eab-book-util.c
+++ b/addressbook/util/eab-book-util.c
@@ -245,7 +245,9 @@ eab_get_phone_type_index (EVCardAttribute *attr)
 
        for (i = 0; i < G_N_ELEMENTS (eab_phone_types); i++) {
                if (e_vcard_attribute_has_type (attr, eab_phone_types[i].type_1) &&
-                   (eab_phone_types[i].type_2 == NULL || e_vcard_attribute_has_type (attr, 
eab_phone_types[i].type_2)))
+                   (eab_phone_types[i].type_2 == NULL || e_vcard_attribute_has_type (attr, 
eab_phone_types[i].type_2) ||
+                   (g_ascii_strcasecmp (eab_phone_types[i].type_2, "VOICE") == 0 &&
+                    g_list_length (e_vcard_attribute_get_param (attr, EVC_TYPE)) == 1)))
                        return i;
        }
 


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