aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-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,