From af89b251904fa5abe2a046ebab62042ab9ce7ed9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 4 Oct 2000 22:36:49 +0000 Subject: Emit the selection/cursor "changed" signals. 2000-10-04 Jeffrey Stedfast * e-table-selection-model.c (e_table_selection_model_invert_selection): Emit the selection/cursor "changed" signals. (e_table_selection_model_select_all): Same. svn path=/trunk/; revision=5724 --- widgets/table/e-table-selection-model.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'widgets/table') diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c index 552d632fc9..10b54ce6bf 100644 --- a/widgets/table/e-table-selection-model.c +++ b/widgets/table/e-table-selection-model.c @@ -239,6 +239,9 @@ e_table_selection_model_init (ETableSelectionModel *selection) selection->selection = NULL; selection->row_count = -1; selection->model = NULL; + selection->selection_start_row = 0; + selection->cursor_row = -1; + selection->cursor_col = -1; } static void @@ -521,6 +524,14 @@ e_table_selection_model_select_all (ETableSelectionModel *selection) for (i = 0; i < (selection->row_count + 31) / 32; i ++) { selection->selection[i] = ONES; } + + selection->cursor_col = 0; + selection->cursor_row = 0; + selection->selection_start_row = 0; + gtk_signal_emit (GTK_OBJECT (selection), + e_table_selection_model_signals [CURSOR_CHANGED], 0, 0); + gtk_signal_emit (GTK_OBJECT (selection), + e_table_selection_model_signals [SELECTION_CHANGED]); } void @@ -542,4 +553,12 @@ e_table_selection_model_invert_selection (ETableSelectionModel *selection) for (i = 0; i < (selection->row_count + 31) / 32; i ++) { selection->selection[i] = ~selection->selection[i]; } + + selection->cursor_col = -1; + selection->cursor_row = -1; + selection->selection_start_row = 0; + gtk_signal_emit (GTK_OBJECT (selection), + e_table_selection_model_signals [CURSOR_CHANGED], -1, -1); + gtk_signal_emit (GTK_OBJECT (selection), + e_table_selection_model_signals [SELECTION_CHANGED]); } -- cgit v1.2.3