aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-individual-view.c17
-rw-r--r--libempathy-gtk/empathy-individual-view.h4
2 files changed, 21 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index fcbc93fa4..dbd8f336b 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -88,6 +88,9 @@ typedef struct
/* Distance between mouse pointer and the nearby border. Negative when
scrolling updards.*/
gint distance;
+
+ GtkTreeModelFilterVisibleFunc custom_filter;
+ gpointer custom_filter_data;
} EmpathyIndividualViewPriv;
typedef struct
@@ -1800,6 +1803,9 @@ individual_view_filter_visible_func (GtkTreeModel *model,
gboolean visible, is_online;
gboolean is_searching = TRUE;
+ if (priv->custom_filter != NULL)
+ return priv->custom_filter (model, iter, priv->custom_filter_data);
+
if (priv->search_widget == NULL ||
!gtk_widget_get_visible (priv->search_widget))
is_searching = FALSE;
@@ -2843,3 +2849,14 @@ empathy_individual_view_start_search (EmpathyIndividualView *self)
else
gtk_widget_show (GTK_WIDGET (priv->search_widget));
}
+
+void
+empathy_individual_view_set_custom_filter (EmpathyIndividualView *self,
+ GtkTreeModelFilterVisibleFunc filter,
+ gpointer data)
+{
+ EmpathyIndividualViewPriv *priv = GET_PRIV (self);
+
+ priv->custom_filter = filter;
+ priv->custom_filter_data = data;
+}
diff --git a/libempathy-gtk/empathy-individual-view.h b/libempathy-gtk/empathy-individual-view.h
index bae7fbcba..ae94ed3d6 100644
--- a/libempathy-gtk/empathy-individual-view.h
+++ b/libempathy-gtk/empathy-individual-view.h
@@ -129,5 +129,9 @@ void empathy_individual_view_set_store (EmpathyIndividualView *self,
void empathy_individual_view_start_search (EmpathyIndividualView *self);
+void empathy_individual_view_set_custom_filter (EmpathyIndividualView *self,
+ GtkTreeModelFilterVisibleFunc filter,
+ gpointer data);
+
G_END_DECLS
#endif /* __EMPATHY_INDIVIDUAL_VIEW_H__ */