]> git.0d.be Git - empathy.git/commitdiff
Make use of the search function to correctly find when typing in the
authorXavier Claessens <xclaesse@gmail.com>
Sat, 8 Sep 2007 15:43:27 +0000 (15:43 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sat, 8 Sep 2007 15:43:27 +0000 (15:43 +0000)
2007-09-08  Xavier Claessens  <xclaesse@gmail.com>

* libempathy-gtk/empathy-contact-list-view.c:
* libempathy-gtk/empathy-contact-list-store.c: Make use of the search
function to correctly find when typing in the contact list view.
Fixes bug #472309 (Will Thompson, Xavier Claessens).

svn path=/trunk/; revision=290

ChangeLog
libempathy-gtk/empathy-contact-list-store.c
libempathy-gtk/empathy-contact-list-view.c

index 8f078e246a68ab103b062d29db9754a30c7bdcf9..c412068216217cbe709022a0884d1b139ad9b05c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-08  Xavier Claessens  <xclaesse@gmail.com>
+
+       * libempathy-gtk/empathy-contact-list-view.c:
+       * libempathy-gtk/empathy-contact-list-store.c: Make use of the search
+       function to correctly find when typing in the contact list view.
+       Fixes bug #472309 (Will Thompson, Xavier Claessens).
+
 2007-09-08  Xavier Claessens  <xclaesse@gmail.com>
 
        * libempathy-gtk/empathy-log-window.c: Fix crash if there is no date 
index 9cf03bfe853508ae51c9bf3d6d9bb5b4fb5d4259..5301bdc76aa6f923908f37af382c4680af8e2c25 100644 (file)
@@ -571,10 +571,10 @@ empathy_contact_list_store_get_parent_group (GtkTreeModel *model,
 
 gboolean
 empathy_contact_list_store_search_equal_func (GtkTreeModel *model,
-                                            gint          column,
-                                            const gchar  *key,
-                                            GtkTreeIter  *iter,
-                                            gpointer      search_data)
+                                             gint          column,
+                                             const gchar  *key,
+                                             GtkTreeIter  *iter,
+                                             gpointer      search_data)
 {
        gchar    *name, *name_folded;
        gchar    *key_folded;
@@ -583,13 +583,13 @@ empathy_contact_list_store_search_equal_func (GtkTreeModel *model,
        g_return_val_if_fail (GTK_IS_TREE_MODEL (model), FALSE);
 
        if (!key) {
-               return FALSE;
+               return TRUE;
        }
 
        gtk_tree_model_get (model, iter, COL_NAME, &name, -1);
 
        if (!name) {
-               return FALSE;
+               return TRUE;
        }
 
        name_folded = g_utf8_casefold (name, -1);
index 5b3f0de08283ff09512fdd5b6b0adb013de86592..4aeac322d513f1a4c309a08931a331a5cc4b517d 100644 (file)
@@ -519,6 +519,10 @@ contact_list_view_setup (EmpathyContactListView *view)
 
        priv = GET_PRIV (view);
 
+       gtk_tree_view_set_search_equal_func (GTK_TREE_VIEW (view),
+                                            empathy_contact_list_store_search_equal_func,
+                                            NULL, NULL);
+
        g_signal_connect (priv->store, "row-has-child-toggled",
                          G_CALLBACK (contact_list_view_row_has_child_toggled_cb),
                          view);