diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-26 23:08:32 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-30 19:35:23 +0800 |
commit | 02ee7fc17b51f8ee5be937f09f8ab01d21735548 (patch) | |
tree | 004cb13502f947ad69d49221535b389225ca3de0 /src | |
parent | 7e082683ab606d1521fbbaa7dffd75efe7395e20 (diff) | |
download | gsoc2013-empathy-02ee7fc17b51f8ee5be937f09f8ab01d21735548.tar.gz gsoc2013-empathy-02ee7fc17b51f8ee5be937f09f8ab01d21735548.tar.zst gsoc2013-empathy-02ee7fc17b51f8ee5be937f09f8ab01d21735548.zip |
factor out contact_added
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-map-view.c | 15 |
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; |