aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kestner <mkestner@ximian.com>2003-07-29 00:09:08 +0800
committerMike Kestner <mkestner@src.gnome.org>2003-07-29 00:09:08 +0800
commit53aa9cac16a45c04482a74d0602e320203aa9514 (patch)
treec5217cea81455ad7bb60c76ed38f998f2dbf166f
parent4760e74c24bade2a70b827fabc8c7f8c1fc6b6e9 (diff)
downloadgsoc2013-evolution-53aa9cac16a45c04482a74d0602e320203aa9514.tar.gz
gsoc2013-evolution-53aa9cac16a45c04482a74d0602e320203aa9514.tar.zst
gsoc2013-evolution-53aa9cac16a45c04482a74d0602e320203aa9514.zip
map model_column to available model row by ignoring disabled columns.
2003-07-28 Mike Kestner <mkestner@ximian.com> * e-table-config (setup_fields): map model_column to available model row by ignoring disabled columns. svn path=/trunk/; revision=21993
-rw-r--r--widgets/table/e-table-config.c9
1 files changed, 7 insertions, 2 deletions
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));
}
}
}