diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-06-07 20:58:12 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-06-08 17:14:20 +0800 |
commit | b98c0e0b2a91f7deec643288082c12d61982f575 (patch) | |
tree | cb9d68dfdff6d9851ce1cacba48b4cfda43bf997 /libempathy-gtk | |
parent | 49f661f321635b6b0350dbf27aec3548fbff8ee2 (diff) | |
download | gsoc2013-empathy-b98c0e0b2a91f7deec643288082c12d61982f575.tar gsoc2013-empathy-b98c0e0b2a91f7deec643288082c12d61982f575.tar.gz gsoc2013-empathy-b98c0e0b2a91f7deec643288082c12d61982f575.tar.bz2 gsoc2013-empathy-b98c0e0b2a91f7deec643288082c12d61982f575.tar.lz gsoc2013-empathy-b98c0e0b2a91f7deec643288082c12d61982f575.tar.xz gsoc2013-empathy-b98c0e0b2a91f7deec643288082c12d61982f575.tar.zst gsoc2013-empathy-b98c0e0b2a91f7deec643288082c12d61982f575.zip |
individual-view: always display individuals having pending events (#651913)
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-individual-view.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index 52ceff6c7..0fb24430c 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -1694,7 +1694,8 @@ individual_view_is_visible_individual (EmpathyIndividualView *self, gboolean is_online, gboolean is_searching, const gchar *group, - gboolean is_fake_group) + gboolean is_fake_group, + guint event_count) { EmpathyIndividualViewPriv *priv = GET_PRIV (self); EmpathyLiveSearch *live = EMPATHY_LIVE_SEARCH (priv->search_widget); @@ -1702,6 +1703,10 @@ individual_view_is_visible_individual (EmpathyIndividualView *self, GeeIterator *iter; gboolean is_favorite, contains_interesting_persona = FALSE; + /* Always display individuals having pending events */ + if (event_count > 0) + return TRUE; + /* We're only giving the visibility wrt filtering here, not things like * presence. */ if (priv->show_untrusted == FALSE && @@ -1777,6 +1782,7 @@ individual_view_filter_visible_func (GtkTreeModel *model, GtkTreeIter child_iter; gboolean visible, is_online; gboolean is_searching = TRUE; + guint event_count; if (priv->custom_filter != NULL) return priv->custom_filter (model, iter, priv->custom_filter_data); @@ -1790,6 +1796,7 @@ individual_view_filter_visible_func (GtkTreeModel *model, EMPATHY_INDIVIDUAL_STORE_COL_IS_SEPARATOR, &is_separator, EMPATHY_INDIVIDUAL_STORE_COL_IS_ONLINE, &is_online, EMPATHY_INDIVIDUAL_STORE_COL_INDIVIDUAL, &individual, + EMPATHY_INDIVIDUAL_STORE_COL_EVENT_COUNT, &event_count, -1); if (individual != NULL) @@ -1800,7 +1807,7 @@ individual_view_filter_visible_func (GtkTreeModel *model, group = get_group (model, iter, &is_fake_group); visible = individual_view_is_visible_individual (self, individual, - is_online, is_searching, group, is_fake_group); + is_online, is_searching, group, is_fake_group, event_count); g_object_unref (individual); g_free (group); @@ -1832,6 +1839,7 @@ individual_view_filter_visible_func (GtkTreeModel *model, gtk_tree_model_get (model, &child_iter, EMPATHY_INDIVIDUAL_STORE_COL_INDIVIDUAL, &individual, EMPATHY_INDIVIDUAL_STORE_COL_IS_ONLINE, &is_online, + EMPATHY_INDIVIDUAL_STORE_COL_EVENT_COUNT, &event_count, -1); if (individual == NULL) @@ -1840,7 +1848,7 @@ individual_view_filter_visible_func (GtkTreeModel *model, group = get_group (model, &child_iter, &is_fake_group); visible = individual_view_is_visible_individual (self, individual, - is_online, is_searching, group, is_fake_group); + is_online, is_searching, group, is_fake_group, event_count); g_object_unref (individual); g_free (group); |