diff options
author | Milan Crha <mcrha@redhat.com> | 2011-09-28 01:28:18 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-09-28 01:28:18 +0800 |
commit | f80a74004ed303b66f4b279e3f772493b4e80ced (patch) | |
tree | b0aa99d12ecb65c627716d92327ab792c52f957e /addressbook/gui | |
parent | 0ed3d1c025dce1bb6c3a4a421f7c41c454263cd6 (diff) | |
download | gsoc2013-evolution-f80a74004ed303b66f4b279e3f772493b4e80ced.tar gsoc2013-evolution-f80a74004ed303b66f4b279e3f772493b4e80ced.tar.gz gsoc2013-evolution-f80a74004ed303b66f4b279e3f772493b4e80ced.tar.bz2 gsoc2013-evolution-f80a74004ed303b66f4b279e3f772493b4e80ced.tar.lz gsoc2013-evolution-f80a74004ed303b66f4b279e3f772493b4e80ced.tar.xz gsoc2013-evolution-f80a74004ed303b66f4b279e3f772493b4e80ced.tar.zst gsoc2013-evolution-f80a74004ed303b66f4b279e3f772493b4e80ced.zip |
Bug #659874 - Address Cards Render extra Phone Number
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 78d98e2cb2..ddfcc1a9f9 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -942,6 +942,7 @@ remodel (EMinicard *e_minicard) gint left_width = -1; gboolean is_list = FALSE; gboolean email_rendered = FALSE; + gboolean has_voice = FALSE, has_fax = FALSE; if (e_minicard->header_text) { file_as = e_contact_get (e_minicard->contact, E_CONTACT_FILE_AS); @@ -966,11 +967,14 @@ remodel (EMinicard *e_minicard) EMinicardField *minicard_field = NULL; gboolean is_email = FALSE; - if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME) + if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME || + (has_voice && field == E_CONTACT_PHONE_OTHER) || + (has_fax && field == E_CONTACT_PHONE_OTHER_FAX)) continue; if (field == E_CONTACT_FULL_NAME && is_list) continue; + if (field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2 || field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) { if (email_rendered) continue; @@ -1019,6 +1023,15 @@ remodel (EMinicard *e_minicard) if (string && *string) { add_field (e_minicard, field, left_width); count++; + + has_voice = has_voice || + field == E_CONTACT_PHONE_BUSINESS || + field == E_CONTACT_PHONE_BUSINESS_2 || + field == E_CONTACT_PHONE_HOME || + field == E_CONTACT_PHONE_HOME_2; + has_fax = has_fax || + field == E_CONTACT_PHONE_BUSINESS_FAX || + field == E_CONTACT_PHONE_HOME_FAX; } g_free (string); } |