From 5e3f91d87bde1ca8484b4a35fc3cdc2f1ede8a85 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 27 Jul 2000 01:36:20 +0000 Subject: Fixed a reference. 2000-07-26 Christopher James Lahey * e-table-click-to-add.c: Fixed a reference. * e-table-selection-model.c, e-table-selection-model.h: Added a clear function. * e-table.c, e-table.h: Made going from click to add to the main table and back work better. svn path=/trunk/; revision=4373 --- widgets/e-table/e-table-selection-model.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'widgets/e-table/e-table-selection-model.c') diff --git a/widgets/e-table/e-table-selection-model.c b/widgets/e-table/e-table-selection-model.c index f896e37eaa..618adc8dae 100644 --- a/widgets/e-table/e-table-selection-model.c +++ b/widgets/e-table/e-table-selection-model.c @@ -44,11 +44,7 @@ enum { static void model_changed(ETableModel *etm, ETableSelectionModel *etsm) { - g_free(etsm->selection); - etsm->selection = NULL; - etsm->row_count = -1; - gtk_signal_emit(GTK_OBJECT(etsm), - e_table_selection_model_signals [SELECTION_CHANGED]); + e_table_selection_model_clear(etsm); } #if 1 @@ -386,3 +382,13 @@ void e_table_selection_model_do_something (ETableSelectionModel } } } + +void +e_table_selection_model_clear(ETableSelectionModel *selection) +{ + g_free(selection->selection); + selection->selection = NULL; + selection->row_count = -1; + gtk_signal_emit(GTK_OBJECT(selection), + e_table_selection_model_signals [SELECTION_CHANGED]); +} -- cgit v1.2.3