Mercurial > pidgin.yaz
diff finch/libgnt/gnttree.c @ 18563:dba4edbde4a7
Patch from Javeed Shaikh to make the search function non-braindamaged.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 19 Jul 2007 21:11:37 +0000 |
parents | 212c2bec5c97 |
children | 36257cac2b11 |
line wrap: on
line diff
--- a/finch/libgnt/gnttree.c Thu Jul 19 08:25:57 2007 +0000 +++ b/finch/libgnt/gnttree.c Thu Jul 19 21:11:37 2007 +0000 @@ -55,7 +55,7 @@ GString *search; int search_timeout; int search_column; - gboolean (*search_func)(GntTree *tree, gpointer key, const char *current); + gboolean (*search_func)(GntTree *tree, gpointer key, const char *search, const char *current); GCompareFunc compare; int lastvisible; @@ -162,7 +162,7 @@ GntTreeCol *col = (col = g_list_nth_data(row->columns, t->priv->search_column)) ? col : row->columns->data; char *one, *two, *z; if (t->priv->search_func) - return t->priv->search_func(t, row->key, col->text); + return t->priv->search_func(t, row->key, t->priv->search->str, col->text); one = g_utf8_casefold(col->text, -1); two = g_utf8_casefold(t->priv->search->str, -1); z = strstr(one, two); @@ -1808,7 +1808,7 @@ } void gnt_tree_set_search_function(GntTree *tree, - gboolean (*func)(GntTree *tree, gpointer key, const char *current)) + gboolean (*func)(GntTree *tree, gpointer key, const char *search, const char *current)) { tree->priv->search_func = func; }