From 061419e7f27f057c624b8a272c29733ae512f219 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 4 Apr 2001 10:17:37 +0000 Subject: Added this function. 2001-04-04 Christopher James Lahey * e-tree-selection-model.c, e-tree-selection-model.h (e_tree_selection_model_change_cursor): Added this function. * e-tree.c (e_tree_set_cursor): Screwed up moving the cursor a small bit when I changed this to be faster before. Fixed it. svn path=/trunk/; revision=9171 --- widgets/table/e-tree-selection-model.c | 8 ++++++++ widgets/table/e-tree-selection-model.h | 2 ++ widgets/table/e-tree.c | 1 + 3 files changed, 11 insertions(+) (limited to 'widgets') diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index b57efb5e11..d8eeb3f083 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -1075,6 +1075,14 @@ e_tree_selection_model_select_single_path (ETreeSelectionModel *etsm, ETreePath e_selection_model_selection_changed(E_SELECTION_MODEL(etsm)); } +void +e_tree_selection_model_change_cursor (ETreeSelectionModel *etsm, ETreePath path) +{ + etsm->priv->cursor_path = path; + + e_selection_model_cursor_changed(E_SELECTION_MODEL(etsm), etsm_cursor_row_real(etsm), etsm->priv->cursor_col); +} + static void e_tree_selection_model_init (ETreeSelectionModel *etsm) diff --git a/widgets/table/e-tree-selection-model.h b/widgets/table/e-tree-selection-model.h index 624d527b07..ffed337835 100644 --- a/widgets/table/e-tree-selection-model.h +++ b/widgets/table/e-tree-selection-model.h @@ -41,6 +41,8 @@ void e_tree_selection_model_foreach (ETreeSelectionModel gpointer closure); void e_tree_selection_model_select_single_path (ETreeSelectionModel *etsm, ETreePath path); +void e_tree_selection_model_change_cursor (ETreeSelectionModel *etsm, + ETreePath path); #ifdef __cplusplus } diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 0aa2668546..523142c0b9 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -1042,6 +1042,7 @@ e_tree_set_cursor (ETree *e_tree, ETreePath path) #ifdef E_TREE_USE_TREE_SELECTION e_tree_selection_model_select_single_path (E_TREE_SELECTION_MODEL(e_tree->priv->selection), path); + e_tree_selection_model_change_cursor (E_TREE_SELECTION_MODEL(e_tree->priv->selection), path); #else path = e_tree_sorted_model_to_view_path(e_tree->priv->sorted, path); -- cgit v1.2.3