[evolution] Bug #659874 - Address Cards Render extra Phone Number
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #659874 - Address Cards Render extra Phone Number
- Date: Tue, 27 Sep 2011 17:30:37 +0000 (UTC)
commit f80a74004ed303b66f4b279e3f772493b4e80ced
Author: Milan Crha <mcrha redhat com>
Date: Tue Sep 27 19:28:18 2011 +0200
Bug #659874 - Address Cards Render extra Phone Number
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 78d98e2..ddfcc1a 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]