]> git.0d.be Git - empathy.git/commitdiff
Remove the treeview's build-in search function, we use the live search now.
authorXavier Claessens <xclaesse@gmail.com>
Thu, 17 Jun 2010 09:17:51 +0000 (11:17 +0200)
committerXavier Claessens <xclaesse@gmail.com>
Thu, 17 Jun 2010 09:17:51 +0000 (11:17 +0200)
libempathy-gtk/empathy-contact-list-store.c
libempathy-gtk/empathy-contact-list-store.h
libempathy-gtk/empathy-contact-list-view.c

index 87e0eb20dfff90f42886e82a8c03954702d21119..57768997de1beaf855ca4bee90fa5d66bfc0c5c9 100644 (file)
@@ -790,48 +790,6 @@ empathy_contact_list_store_get_parent_group (GtkTreeModel *model,
        return name;
 }
 
        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)
 {
 static void
 contact_list_store_setup (EmpathyContactListStore *store)
 {
index b8008cadb95fa72bf00320ef53c65cffef2f5583..1760a0066faba628672e49557c43bad68b76cb54 100644 (file)
@@ -109,11 +109,6 @@ gchar *                    empathy_contact_list_store_get_parent_group   (GtkTre
                                                                         GtkTreePath                *path,
                                                                         gboolean                   *path_is_group,
                                                                         gboolean                   *is_fake_group);
                                                                         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);
 
 GdkPixbuf *                contact_list_store_get_contact_status_icon ( EmpathyContactListStore *store,
                                                                         EmpathyContact             *contact);
 
index 309e1481ac3e28cfff6e0534d3bacee447db3f7b..c9fc1c595e682b6d16dbc3d53f6ef1db7e05cf48 100644 (file)
@@ -1423,10 +1423,6 @@ contact_list_view_constructed (GObject *object)
        GtkTreeViewColumn          *col;
        guint                       i;
 
        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,
        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,