[evolution] I#507 - Mobile Phone shown twice in the contact preview
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#507 - Mobile Phone shown twice in the contact preview
- Date: Tue, 25 Jun 2019 12:33:08 +0000 (UTC)
commit 4c4c463c4621831b6579e77821803b7056c42db2
Author: Milan Crha <mcrha redhat com>
Date: Tue Jun 25 14:35:09 2019 +0200
I#507 - Mobile Phone shown twice in the contact preview
Closes https://gitlab.gnome.org/GNOME/evolution/issues/507
src/addressbook/gui/widgets/eab-contact-formatter.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/addressbook/gui/widgets/eab-contact-formatter.c
b/src/addressbook/gui/widgets/eab-contact-formatter.c
index d2666f6e5f..cd6437b7cb 100644
--- a/src/addressbook/gui/widgets/eab-contact-formatter.c
+++ b/src/addressbook/gui/widgets/eab-contact-formatter.c
@@ -745,6 +745,11 @@ get_phone_location (EVCardAttribute *attr)
for (ii = 0; ii < G_N_ELEMENTS (locations); ii++) {
if (!g_ascii_strcasecmp (value, locations[ii].attr_type)) {
+ /* Skip the Work Fax, which is shown in the Work section */
+ if (locations[ii].field_id == E_CONTACT_PHONE_OTHER_FAX &&
+ e_vcard_attribute_has_type (attr, "WORK"))
+ continue;
+
if (location) {
/* if more than one is set, then fallback to the "Other Phone" */
location = NULL;
@@ -990,7 +995,6 @@ render_personal_column (EABContactFormatter *formatter,
accum_attribute (accum, contact, _("Home Page"), E_CONTACT_HOMEPAGE_URL, NULL,
E_TEXT_TO_HTML_CONVERT_URLS);
accum_attribute (accum, contact, _("Web Log"), E_CONTACT_BLOG_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS);
accum_attribute (accum, contact, _("Phone"), E_CONTACT_PHONE_HOME, NULL, phone_flags);
- accum_attribute (accum, contact, _("Mobile Phone"), E_CONTACT_PHONE_MOBILE, NULL, phone_flags);
accum_sip (accum, contact, EAB_CONTACT_FORMATTER_SIP_TYPE_HOME, NULL, sip_flags);
accum_address (accum, contact, _("Address"), E_CONTACT_ADDRESS_HOME, E_CONTACT_ADDRESS_LABEL_HOME);
accum_time_attribute (accum, contact, _("Birthday"), E_CONTACT_BIRTH_DATE, NULL, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]