From 7b4910d63646159ac5dcc3d774c6ec3e7f18cce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Thu, 2 Jun 2011 18:45:23 +0200 Subject: Bug #636809 - Address labels formatting improvements Address labels should be formated according to country specific standards. --- addressbook/gui/contact-editor/e-contact-editor.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'addressbook/gui/contact-editor') 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 ( -- cgit v1.2.3