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
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:25 +0800
commit7b4910d63646159ac5dcc3d774c6ec3e7f18cce9 (patch)
tree916164722612d2550ab623c7fabbdcfe849a16d5 /addressbook/gui/contact-editor
parentf36331f1a7d99b83f13010e35f604bd6857b6019 (diff)
downloadgsoc2013-evolution-7b4910d63646159ac5dcc3d774c6ec3e7f18cce9.tar
gsoc2013-evolution-7b4910d63646159ac5dcc3d774c6ec3e7f18cce9.tar.gz
gsoc2013-evolution-7b4910d63646159ac5dcc3d774c6ec3e7f18cce9.tar.bz2
gsoc2013-evolution-7b4910d63646159ac5dcc3d774c6ec3e7f18cce9.tar.lz
gsoc2013-evolution-7b4910d63646159ac5dcc3d774c6ec3e7f18cce9.tar.xz
gsoc2013-evolution-7b4910d63646159ac5dcc3d774c6ec3e7f18cce9.tar.zst
gsoc2013-evolution-7b4910d63646159ac5dcc3d774c6ec3e7f18cce9.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 (