aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2011-06-03 00:45:23 +0800
committerMilan Crha <mcrha@redhat.com>2011-06-03 00:45:23 +0800
commit171b6f61495d43e672077ac2f8d5478d18fb6f23 (patch)
tree18d592878ded88d7105f455cac16b24f41899743 /addressbook/gui/contact-editor
parent2da8860539e06f260fdb2dc9247d4ec5638d0aa2 (diff)
downloadgsoc2013-evolution-171b6f61495d43e672077ac2f8d5478d18fb6f23.tar
gsoc2013-evolution-171b6f61495d43e672077ac2f8d5478d18fb6f23.tar.gz
gsoc2013-evolution-171b6f61495d43e672077ac2f8d5478d18fb6f23.tar.bz2
gsoc2013-evolution-171b6f61495d43e672077ac2f8d5478d18fb6f23.tar.lz
gsoc2013-evolution-171b6f61495d43e672077ac2f8d5478d18fb6f23.tar.xz
gsoc2013-evolution-171b6f61495d43e672077ac2f8d5478d18fb6f23.tar.zst
gsoc2013-evolution-171b6f61495d43e672077ac2f8d5478d18fb6f23.zip
Bug #636809 - Address labels formatting improvements
Address labels should be formated according to country specific standards.
Diffstat (limited to 'addressbook/gui/contact-editor')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 4cdf1e2185..f545594039 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2247,7 +2247,16 @@ set_address_label (EContact *contact,
{
gchar *address_label = NULL;
- if (address) {
+ if (!address) {
+ e_contact_set (contact, field, NULL);
+ return;
+ }
+
+ address_label = eab_format_address (contact,
+ (field == E_CONTACT_ADDRESS_LABEL_WORK) ? E_CONTACT_ADDRESS_WORK :
+ E_CONTACT_ADDRESS_HOME);
+
+ if (!address_label) {
address_label = append_to_address_label (
address_label, address->street, TRUE);
address_label = append_to_address_label (