[empathy] Remove the treeview's build-in search function, we use the live search now.
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Remove the treeview's build-in search function, we use the live search now.
- Date: Thu, 17 Jun 2010 09:30:34 +0000 (UTC)
commit d0b4b584e9cab568cd6bc25e2ad0fc0a00cfbca2
Author: Xavier Claessens <xclaesse gmail com>
Date: Thu Jun 17 11:17:51 2010 +0200
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, 0 insertions(+), 51 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index 87e0eb2..5776899 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 b8008ca..1760a00 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 309e148..c9fc1c5 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]