From d0b4b584e9cab568cd6bc25e2ad0fc0a00cfbca2 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 17 Jun 2010 11:17:51 +0200 Subject: Remove the treeview's build-in search function, we use the live search now. --- libempathy-gtk/empathy-contact-list-store.c | 42 ----------------------------- libempathy-gtk/empathy-contact-list-store.h | 5 ---- libempathy-gtk/empathy-contact-list-view.c | 4 --- 3 files changed, 51 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c index 87e0eb20d..57768997d 100644 --- a/libempathy-gtk/empathy-contact-list-store.c +++ b/libempathy-gtk/empathy-contact-list-store.c @@ -790,48 +790,6 @@ empathy_contact_list_store_get_parent_group (GtkTreeModel *model, return name; } -gboolean -empathy_contact_list_store_search_equal_func (GtkTreeModel *model, - gint column, - const gchar *key, - GtkTreeIter *iter, - gpointer search_data) -{ - gchar *name, *name_folded; - gchar *key_folded; - gboolean ret; - - g_return_val_if_fail (GTK_IS_TREE_MODEL (model), FALSE); - - if (!key) { - return TRUE; - } - - gtk_tree_model_get (model, iter, - EMPATHY_CONTACT_LIST_STORE_COL_NAME, &name, - -1); - - if (!name) { - return TRUE; - } - - name_folded = g_utf8_casefold (name, -1); - key_folded = g_utf8_casefold (key, -1); - - if (name_folded && key_folded && - strstr (name_folded, key_folded)) { - ret = FALSE; - } else { - ret = TRUE; - } - - g_free (name); - g_free (name_folded); - g_free (key_folded); - - return ret; -} - static void contact_list_store_setup (EmpathyContactListStore *store) { diff --git a/libempathy-gtk/empathy-contact-list-store.h b/libempathy-gtk/empathy-contact-list-store.h index b8008cadb..1760a0066 100644 --- a/libempathy-gtk/empathy-contact-list-store.h +++ b/libempathy-gtk/empathy-contact-list-store.h @@ -109,11 +109,6 @@ gchar * empathy_contact_list_store_get_parent_group (GtkTre GtkTreePath *path, gboolean *path_is_group, gboolean *is_fake_group); -gboolean empathy_contact_list_store_search_equal_func (GtkTreeModel *model, - gint column, - const gchar *key, - GtkTreeIter *iter, - gpointer search_data); GdkPixbuf * contact_list_store_get_contact_status_icon ( EmpathyContactListStore *store, EmpathyContact *contact); diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index 309e1481a..c9fc1c595 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -1423,10 +1423,6 @@ contact_list_view_constructed (GObject *object) GtkTreeViewColumn *col; guint i; - gtk_tree_view_set_search_equal_func (GTK_TREE_VIEW (view), - empathy_contact_list_store_search_equal_func, - NULL, NULL); - priv->filter = GTK_TREE_MODEL_FILTER (gtk_tree_model_filter_new ( GTK_TREE_MODEL (priv->store), NULL)); gtk_tree_model_filter_set_visible_func (priv->filter, -- cgit v1.2.3