diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-08-26 02:35:06 +0800 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-08-27 18:55:27 +0800 |
commit | 2c7fdebf7a7cea6efbc0a305e681b7e7d158d821 (patch) | |
tree | d46e3f0b83c3b7bcbfe66efbf95bf3efed49c307 /libempathy-gtk | |
parent | a0d79de6f5151ee14b25364060e5dd2338f800a9 (diff) | |
download | gsoc2013-empathy-2c7fdebf7a7cea6efbc0a305e681b7e7d158d821.tar gsoc2013-empathy-2c7fdebf7a7cea6efbc0a305e681b7e7d158d821.tar.gz gsoc2013-empathy-2c7fdebf7a7cea6efbc0a305e681b7e7d158d821.tar.bz2 gsoc2013-empathy-2c7fdebf7a7cea6efbc0a305e681b7e7d158d821.tar.lz gsoc2013-empathy-2c7fdebf7a7cea6efbc0a305e681b7e7d158d821.tar.xz gsoc2013-empathy-2c7fdebf7a7cea6efbc0a305e681b7e7d158d821.tar.zst gsoc2013-empathy-2c7fdebf7a7cea6efbc0a305e681b7e7d158d821.zip |
Move all individual view visibility logic into is_visible_individual()
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-individual-view.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index b8365d175..25de9510f 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -1577,7 +1577,9 @@ individual_view_store_row_deleted_cb (GtkTreeModel *model, static gboolean individual_view_is_visible_individual (EmpathyIndividualView *self, - FolksIndividual *individual) + FolksIndividual *individual, + gboolean is_online, + gboolean is_searching) { EmpathyIndividualViewPriv *priv = GET_PRIV (self); EmpathyLiveSearch *live = EMPATHY_LIVE_SEARCH (priv->search_widget); @@ -1586,8 +1588,8 @@ individual_view_is_visible_individual (EmpathyIndividualView *self, /* We're only giving the visibility wrt filtering here, not things like * presence. */ - if (live == NULL || gtk_widget_get_visible (GTK_WIDGET (live)) == FALSE) - return TRUE; + if (is_searching == FALSE) + return (priv->show_offline || is_online); /* check alias name */ str = folks_individual_get_alias (individual); @@ -1649,10 +1651,8 @@ individual_view_filter_visible_func (GtkTreeModel *model, if (individual != NULL) { - if (is_searching == TRUE) - visible = individual_view_is_visible_individual (self, individual); - else - visible = (priv->show_offline || is_online); + visible = individual_view_is_visible_individual (self, individual, + is_online, is_searching); g_object_unref (individual); @@ -1685,12 +1685,12 @@ individual_view_filter_visible_func (GtkTreeModel *model, if (individual == NULL) continue; - visible = individual_view_is_visible_individual (self, individual); + visible = individual_view_is_visible_individual (self, individual, + is_online, is_searching); g_object_unref (individual); /* show group if it has at least one visible contact in it */ - if ((is_searching && visible) || - (!is_searching && (priv->show_offline || is_online))) + if (visible == TRUE) return TRUE; } |