[gnome-maps/gnome-3-18] maps-contact-store: Do not add address type if single address



commit 3ffde629837301279a109595af90c7eb30c6af0a
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Wed Oct 14 19:16:03 2015 +0200

    maps-contact-store: Do not add address type if single address
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756557

 lib/maps-contact-store.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/lib/maps-contact-store.c b/lib/maps-contact-store.c
index 168d175..fe9982a 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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]