aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-04-18 01:09:25 +0800
committerMilan Crha <mcrha@redhat.com>2012-04-18 01:09:25 +0800
commite0d526c5884b3bceaa6fd285b7fa6cd53c5cbe82 (patch)
tree4e1d961955b24b575e48f39c9b7aaea9f81cf166
parent156954e8b6b9cfaba196e25ed69f2f0210c76a4c (diff)
downloadgsoc2013-evolution-e0d526c5884b3bceaa6fd285b7fa6cd53c5cbe82.tar
gsoc2013-evolution-e0d526c5884b3bceaa6fd285b7fa6cd53c5cbe82.tar.gz
gsoc2013-evolution-e0d526c5884b3bceaa6fd285b7fa6cd53c5cbe82.tar.bz2
gsoc2013-evolution-e0d526c5884b3bceaa6fd285b7fa6cd53c5cbe82.tar.lz
gsoc2013-evolution-e0d526c5884b3bceaa6fd285b7fa6cd53c5cbe82.tar.xz
gsoc2013-evolution-e0d526c5884b3bceaa6fd285b7fa6cd53c5cbe82.tar.zst
gsoc2013-evolution-e0d526c5884b3bceaa6fd285b7fa6cd53c5cbe82.zip
Bug #667912 - Remove name field from formatted address label
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index b1c8cdc898..56eb02b2bb 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -52,8 +52,8 @@
#include <camel/camel.h>
/* Template tags for address format localization */
-#define ADDRESS_REALNAME "%n"
-#define ADDRESS_REALNAME_UPPER "%N"
+#define ADDRESS_REALNAME "%n" /* this is not used intentionally */
+#define ADDRESS_REALNAME_UPPER "%N" /* this is not used intentionally */
#define ADDRESS_COMPANY "%m"
#define ADDRESS_COMPANY_UPPER "%M"
#define ADDRESS_POBOX "%p"
@@ -945,8 +945,10 @@ parse_address_template_section (const gchar *format,
switch (pos[1]) {
case 'n':
- g_string_append (res, realname);
- ret = TRUE;
+ if (realname && *realname) {
+ g_string_append (res, realname);
+ ret = TRUE;
+ }
pos += 2; /* Jump behind the modifier, see what's next */
break;
case 'N':
@@ -1119,9 +1121,12 @@ eab_format_address (EContact *contact,
}
/* Expand all the variables in format.
- * Don't display organization in home address */
+ * Don't display organization in home address;
+ * and skip full names, as it's part of the EContact itself,
+ * check this bug for reason: https://bugzilla.gnome.org/show_bug.cgi?id=667912
+ */
parse_address_template_section (format,
- e_contact_get_const (contact, E_CONTACT_FULL_NAME),
+ NULL,
(address_type == E_CONTACT_ADDRESS_WORK) ? e_contact_get_const (contact, E_CONTACT_ORG): NULL,
addr,
&result);