diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-25 20:36:55 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-06-14 15:21:48 +0800 |
commit | 9b6edadbcbf706fe6d856d84e1631aaa74669625 (patch) | |
tree | 69bd357e6d614416c366f1fa390cb4a2758a4d62 /libempathy-gtk | |
parent | 4d1d36ed1fef6f6e374d0a6c7a961c4c7bbfe980 (diff) | |
download | gsoc2013-empathy-9b6edadbcbf706fe6d856d84e1631aaa74669625.tar gsoc2013-empathy-9b6edadbcbf706fe6d856d84e1631aaa74669625.tar.gz gsoc2013-empathy-9b6edadbcbf706fe6d856d84e1631aaa74669625.tar.bz2 gsoc2013-empathy-9b6edadbcbf706fe6d856d84e1631aaa74669625.tar.lz gsoc2013-empathy-9b6edadbcbf706fe6d856d84e1631aaa74669625.tar.xz gsoc2013-empathy-9b6edadbcbf706fe6d856d84e1631aaa74669625.tar.zst gsoc2013-empathy-9b6edadbcbf706fe6d856d84e1631aaa74669625.zip |
factor out populate_view()
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-roster-view.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c index 8049b8436..95b1498d2 100644 --- a/libempathy-gtk/empathy-roster-view.c +++ b/libempathy-gtk/empathy-roster-view.c @@ -203,31 +203,38 @@ filter_list (GtkWidget *child, } static void +populate_view (EmpathyRosterView *self) +{ + GList *individuals, *l; + + individuals = empathy_individual_manager_get_members (self->priv->manager); + for (l = individuals; l != NULL; l = g_list_next (l)) + { + FolksIndividual *individual = l->data; + + individual_added (self, individual); + } + + g_list_free (individuals); +} + +static void empathy_roster_view_constructed (GObject *object) { EmpathyRosterView *self = EMPATHY_ROSTER_VIEW (object); void (*chain_up) (GObject *) = ((GObjectClass *) empathy_roster_view_parent_class)->constructed; - GList *individuals, *l; if (chain_up != NULL) chain_up (object); g_assert (EMPATHY_IS_INDIVIDUAL_MANAGER (self->priv->manager)); - individuals = empathy_individual_manager_get_members (self->priv->manager); - for (l = individuals; l != NULL; l = g_list_next (l)) - { - FolksIndividual *individual = l->data; - - individual_added (self, individual); - } + populate_view (self); tp_g_signal_connect_object (self->priv->manager, "members-changed", G_CALLBACK (members_changed_cb), self, 0); - g_list_free (individuals); - egg_list_box_set_sort_func (EGG_LIST_BOX (self), (GCompareDataFunc) roster_view_sort, self, NULL); |