From fd6d3fc84dbd00c3c1015ac8f9b54935fc1c12e9 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 11 Mar 2008 12:22:37 +0000 Subject: Make sure we don't expect contact id and handle to be directly ready. Add some _run_until_ready. svn path=/trunk/; revision=755 --- libempathy-gtk/empathy-contact-list-store.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libempathy-gtk/empathy-contact-list-store.c') diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c index 46fa99474..84c7223ff 100644 --- a/libempathy-gtk/empathy-contact-list-store.c +++ b/libempathy-gtk/empathy-contact-list-store.c @@ -880,7 +880,8 @@ contact_list_store_add_contact (EmpathyContactListStore *store, priv = GET_PRIV (store); - if (!priv->show_offline && !empathy_contact_is_online (contact)) { + if (!(empathy_contact_get_ready (contact) & EMPATHY_CONTACT_READY_ID) || + (!priv->show_offline && !empathy_contact_is_online (contact))) { return; } @@ -1488,15 +1489,14 @@ contact_list_store_find_contact_foreach (GtkTreeModel *model, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT, &contact, -1); - if (!contact) { - return FALSE; - } - - if (empathy_contact_equal (contact, fc->contact)) { + if (contact == fc->contact) { fc->found = TRUE; fc->iters = g_list_append (fc->iters, gtk_tree_iter_copy (iter)); } - g_object_unref (contact); + + if (contact) { + g_object_unref (contact); + } return FALSE; } -- cgit v1.2.3