changeset 18535:fad459189cc5

New feature: successful compilation.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 14 Jul 2007 03:02:41 +0000
parents ffa46a399f3c
children 70509e165225
files finch/gntblist.c finch/libgnt/gnttree.c finch/libgnt/gnttree.h
diffstat 3 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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");
--- 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);
+}
+
--- 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 */