aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table-selection-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/e-table/e-table-selection-model.c')
-rw-r--r--widgets/e-table/e-table-selection-model.c16
1 files changed, 11 insertions, 5 deletions
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]);
+}