From 53aa9cac16a45c04482a74d0602e320203aa9514 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Mon, 28 Jul 2003 16:09:08 +0000 Subject: map model_column to available model row by ignoring disabled columns. 2003-07-28 Mike Kestner * e-table-config (setup_fields): map model_column to available model row by ignoring disabled columns. svn path=/trunk/; revision=21993 --- widgets/table/e-table-config.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'widgets') diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index bb13dfcc91..4881edb687 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -372,8 +372,13 @@ setup_fields (ETableConfig *config) if (config->temp_state) { for (i = 0; i < config->temp_state->col_count; i++) { - e_table_subset_variable_add (config->shown_model, config->temp_state->columns[i]); - e_table_without_hide (config->available_model, GINT_TO_POINTER(config->temp_state->columns[i])); + gint j, idx; + for (j = 0, idx = 0; j < config->temp_state->columns[i]; j++) + if (!config->source_spec->columns[j]->disabled) + idx++; + + e_table_subset_variable_add (config->shown_model, idx); + e_table_without_hide (config->available_model, GINT_TO_POINTER(idx)); } } } -- cgit