[evolution-data-server/gnome-3-22] Bug 775618 - Contacts on Google does not accept a second address line
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-22] Bug 775618 - Contacts on Google does not accept a second address line
- Date: Tue, 6 Dec 2016 17:24:38 +0000 (UTC)
commit a5b8424d0df689ab0ca85ea4923ac58704f4b965
Author: Milan Crha <mcrha redhat com>
Date: Tue Dec 6 18:21:30 2016 +0100
Bug 775618 - Contacts on Google does not accept a second address line
addressbook/backends/google/e-book-google-utils.c | 22 ++++++++++++++++++--
1 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/addressbook/backends/google/e-book-google-utils.c
b/addressbook/backends/google/e-book-google-utils.c
index 6544b02..ffb2be2 100644
--- a/addressbook/backends/google/e-book-google-utils.c
+++ b/addressbook/backends/google/e-book-google-utils.c
@@ -1524,11 +1524,27 @@ gdata_gd_postal_address_from_attribute (EVCardAttribute *attr,
value = value->next;
if (!value)
return address;
- gdata_gd_postal_address_set_house_name (address, (*((gchar *) value->data) != '\0') ?
value->data : NULL);
+ label = (*((gchar *) value->data) != '\0') ? value->data : NULL;
value = value->next;
- if (!value)
+ if (!value) {
+ gdata_gd_postal_address_set_street (address, label);
return address;
- gdata_gd_postal_address_set_street (address, (*((gchar *) value->data) != '\0') ? value->data
: NULL);
+ }
+ if (label) {
+ const gchar *value_str = (*((gchar *) value->data) != '\0') ? value->data : NULL;
+
+ if (value_str) {
+ gchar *tmp;
+
+ tmp = g_strconcat (value_str, "\n", label, NULL);
+ gdata_gd_postal_address_set_street (address, tmp);
+ g_free (tmp);
+ } else {
+ gdata_gd_postal_address_set_street (address, label);
+ }
+ } else {
+ gdata_gd_postal_address_set_street (address, (*((gchar *) value->data) != '\0') ?
value->data : NULL);
+ }
value = value->next;
if (!value)
return address;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]