From a37e4f4213fb62793ebb145aecc71c59b098434d Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Thu, 12 Jun 2003 13:35:46 +0000 Subject: guard against NULL strings don't add disabled column titles to the store. 2003-06-12 Mike Kestner * e-cell-text.c (generate_layout): guard against NULL strings * e-table-config.c (create_global_store): don't add disabled column titles to the store. [44258] * e-tree-table-adapter.c (e_t_t_a_node_set_expanded): don't warn if we're trying to collapse a node that's not visible. * e-tree.c (et_connect_to_etta): don't connect to row_inserted and row_deleted. [43893] svn path=/trunk/; revision=21424 --- widgets/table/e-table-config.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'widgets/table/e-table-config.c') diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index dd05ee0760..bb13dfcc91 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -517,10 +517,14 @@ create_global_store (ETableConfig *config) global_store = e_table_memory_store_new (store_columns); for (i = 0; config->source_spec->columns[i]; i++) { - char *text = g_strdup (dgettext (config->domain, - config->source_spec->columns[i]->title)); - e_table_memory_store_insert_adopt (E_TABLE_MEMORY_STORE (global_store), i, NULL, text); + char *text; + + if (config->source_spec->columns[i]->disabled) + continue; + + text = g_strdup (dgettext (config->domain, config->source_spec->columns[i]->title)); + e_table_memory_store_insert_adopt (E_TABLE_MEMORY_STORE (global_store), -1, NULL, text); } } -- cgit