# HG changeset patch # User Sadrul Habib Chowdhury # Date 1184382161 0 # Node ID fad459189cc5fc130bd38afe4fb20ceab7646f5b # Parent ffa46a399f3ccaf2489509157972f20107f0843b New feature: successful compilation. diff -r ffa46a399f3c -r fad459189cc5 finch/gntblist.c --- a/finch/gntblist.c Sat Jul 14 02:15:42 2007 +0000 +++ b/finch/gntblist.c Sat Jul 14 03:02:41 2007 +0000 @@ -1495,7 +1495,7 @@ } else if (strcmp(text, GNT_KEY_CTRL_O) == 0) { purple_prefs_set_bool(PREF_ROOT "/showoffline", !purple_prefs_get_bool(PREF_ROOT "/showoffline")); - } else if (GNT_TREE(ggblist->tree)->search == NULL) { + } else if (!gnt_tree_is_searching(GNT_TREE(ggblist->tree))) { if (strcmp(text, "t") == 0) { finch_blist_toggle_tag_buddy(gnt_tree_get_selection_data(GNT_TREE(ggblist->tree))); gnt_bindable_perform_action_named(GNT_BINDABLE(ggblist->tree), "move-down"); diff -r ffa46a399f3c -r fad459189cc5 finch/libgnt/gnttree.c --- a/finch/libgnt/gnttree.c Sat Jul 14 02:15:42 2007 +0000 +++ b/finch/libgnt/gnttree.c Sat Jul 14 03:02:41 2007 +0000 @@ -1798,3 +1798,8 @@ tree->priv->search_column = col; } +gboolean gnt_tree_is_searching(GntTree *tree) +{ + return (tree->priv->search != NULL); +} + diff -r ffa46a399f3c -r fad459189cc5 finch/libgnt/gnttree.h --- a/finch/libgnt/gnttree.h Sat Jul 14 02:15:42 2007 +0000 +++ b/finch/libgnt/gnttree.h Sat Jul 14 03:02:41 2007 +0000 @@ -508,6 +508,14 @@ */ void gnt_tree_set_search_column(GntTree *tree, int col); +/** + * Check whether the user is currently in the middle of a search. + * + * @param tree The tree + * @return @c TRUE if the user is searching, @c FALSE otherwise. + */ +gboolean gnt_tree_is_searching(GntTree *tree); + G_END_DECLS #endif /* GNT_TREE_H */