aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/empathy-map-view.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index e5240cb9c..11e0f0485 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -290,6 +290,16 @@ create_marker (EmpathyMapView *window,
return CHAMPLAIN_MARKER (marker);
}
+static void
+contact_added (EmpathyMapView *window,
+ EmpathyContact *contact)
+{
+ g_signal_connect (contact, "notify::location",
+ G_CALLBACK (map_view_contact_location_notify), window);
+
+ map_view_update_contact_position (window, contact);
+}
+
static gboolean
map_view_contacts_foreach (GtkTreeModel *model,
GtkTreePath *path,
@@ -305,10 +315,7 @@ map_view_contacts_foreach (GtkTreeModel *model,
if (contact == NULL)
return FALSE;
- g_signal_connect (contact, "notify::location",
- G_CALLBACK (map_view_contact_location_notify), window);
-
- map_view_update_contact_position (window, contact);
+ contact_added (window, contact);
g_object_unref (contact);
return FALSE;