aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/empathy-map-view.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index 11e0eb471..da5837e43 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -293,14 +293,21 @@ map_view_contacts_foreach (GtkTreeModel *model,
EmpathyContact *contact;
ClutterActor *marker;
ClutterActor *texture;
+ GHashTable *location;
GdkPixbuf *avatar;
const gchar *name;
gtk_tree_model_get (model, iter, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT,
&contact, -1);
+
if (contact == NULL)
return FALSE;
+ location = empathy_contact_get_location (contact);
+
+ if (location == NULL)
+ return FALSE;
+
marker = champlain_marker_new ();
avatar = empathy_pixbuf_avatar_from_contact_scaled (contact, 32, 32);
@@ -316,20 +323,17 @@ map_view_contacts_foreach (GtkTreeModel *model,
name = empathy_contact_get_name (contact);
champlain_marker_set_text (CHAMPLAIN_MARKER (marker), name);
- map_view_marker_update_position (CHAMPLAIN_MARKER (marker), contact);
-
clutter_container_add (CLUTTER_CONTAINER (window->layer), marker, NULL);
g_signal_connect (contact, "notify::location",
G_CALLBACK (map_view_contact_location_notify), marker);
+
#if HAVE_GEOCLUE
gchar *str;
GHashTable *address;
- GHashTable *location;
GValue *value;
- location = empathy_contact_get_location (contact);
value = g_hash_table_lookup (location, EMPATHY_LOCATION_LON);
if (value == NULL)
{
@@ -361,6 +365,8 @@ map_view_contacts_foreach (GtkTreeModel *model,
}
#endif
+ map_view_marker_update_position (CHAMPLAIN_MARKER (marker), contact);
+
g_object_unref (contact);
return FALSE;
}