aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kestner <mkestner@ximian.com>2002-09-24 15:01:02 +0800
committerMike Kestner <mkestner@src.gnome.org>2002-09-24 15:01:02 +0800
commit22c6cebf6b5e10754c209e6052173967d4092142 (patch)
tree5f6c237ebdffe3244c62d3059c30333253632391
parentadfb8ab4d8c42af132cda089373dea014799dbec (diff)
downloadgsoc2013-evolution-22c6cebf6b5e10754c209e6052173967d4092142.tar.gz
gsoc2013-evolution-22c6cebf6b5e10754c209e6052173967d4092142.tar.zst
gsoc2013-evolution-22c6cebf6b5e10754c209e6052173967d4092142.zip
New api to set the search column on a tree without having to set a sort
2002-09-24 Mike Kestner <mkestner@ximian.com> * e-tree.c (e_tree_set_search_column): New api to set the search column on a tree without having to set a sort column. svn path=/trunk/; revision=18193
-rw-r--r--widgets/table/e-tree.c21
-rw-r--r--widgets/table/e-tree.h2
2 files changed, 23 insertions, 0 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index f3b21fff50..e1073e5b01 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -1107,6 +1107,27 @@ e_tree_setup_table (ETree *e_tree)
et_build_item(e_tree);
}
+/**
+ * e_tree_set_search_column:
+ * @e_tree: #ETree object that will be modified
+ * @col: Column index to use for searches
+ *
+ * This routine sets the current search column to be used for keypress
+ * searches of the #ETree. If -1 is passed in for column, the current
+ * search column is cleared.
+ */
+void
+e_tree_set_search_column (ETree *e_tree, gint col)
+{
+ if (col == -1) {
+ clear_current_search_col (e_tree);
+ return;
+ }
+
+ e_tree->priv->search_col_set = TRUE;
+ e_tree->priv->current_search_col = e_table_header_get_column (e_tree->priv->full_header, col);
+}
+
void
e_tree_set_state_object(ETree *e_tree, ETableState *state)
{
diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h
index 32c3d0689d..b877b00d1f 100644
--- a/widgets/table/e-tree.h
+++ b/widgets/table/e-tree.h
@@ -167,6 +167,8 @@ ETableState *e_tree_get_state_object (ETree *e_tree)
ETableSpecification *e_tree_get_spec (ETree *e_tree);
/* note that it is more efficient to provide the state at creation time */
+void e_tree_set_search_column (ETree *e_tree,
+ gint col);
void e_tree_set_state (ETree *e_tree,
const gchar *state);
void e_tree_set_state_object (ETree *e_tree,