summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJonas Danielsson <jonas@threetimestwo.org>2015-10-14 19:16:03 +0200
committerJonas Danielsson <jonas@threetimestwo.org>2015-10-14 19:18:14 +0200
commitaf0e5e36671bb70dc13d73d1d62d4696b3b0f491 (patch)
tree647344e8118e98f99c29e4144265cf077bf8dc59 /lib
parent64a5e3d2ed708ee346c0fd504f99be859d015229 (diff)
downloadgnome-maps-af0e5e36671bb70dc13d73d1d62d4696b3b0f491.tar.gz
maps-contact-store: Do not add address type if single address
https://bugzilla.gnome.org/show_bug.cgi?id=756557
Diffstat (limited to 'lib')
-rw-r--r--lib/maps-contact-store.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/maps-contact-store.c b/lib/maps-contact-store.c
index 168d1754..fe9982a5 100644
--- a/lib/maps-contact-store.c
+++ b/lib/maps-contact-store.c
@@ -170,9 +170,16 @@ get_contact (FolksIndividual *individual)
type = gee_iterator_get (values_iter);
}
}
- name = g_strdup_printf ("%s (%s)",
- folks_individual_get_display_name (individual),
- type);
+ if (gee_collection_get_size (addresses) > 1)
+ {
+ name = g_strdup_printf ("%s (%s)",
+ folks_individual_get_display_name (individual),
+ type);
+ }
+ else
+ {
+ name = g_strdup (folks_individual_get_display_name (individual));
+ }
place = geocode_place_new (name, GEOCODE_PLACE_TYPE_STREET);
g_free (name);