diff options
author | Mike Kestner <mkestner@ximian.com> | 2003-06-12 21:35:46 +0800 |
---|---|---|
committer | Mike Kestner <mkestner@src.gnome.org> | 2003-06-12 21:35:46 +0800 |
commit | a37e4f4213fb62793ebb145aecc71c59b098434d (patch) | |
tree | 0fbff5ff62446cc68c1157b523c283375f5bea39 | |
parent | 6bea76c294f9ccc4b4e293ade973e9370a89f30c (diff) | |
download | gsoc2013-evolution-a37e4f4213fb62793ebb145aecc71c59b098434d.tar.gz gsoc2013-evolution-a37e4f4213fb62793ebb145aecc71c59b098434d.tar.zst gsoc2013-evolution-a37e4f4213fb62793ebb145aecc71c59b098434d.zip |
guard against NULL strings don't add disabled column titles to the store.
2003-06-12 Mike Kestner <mkestner@ximian.com>
* 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
-rw-r--r-- | widgets/table/e-cell-text.c | 2 | ||||
-rw-r--r-- | widgets/table/e-table-config.c | 10 | ||||
-rw-r--r-- | widgets/table/e-tree-table-adapter.c | 2 | ||||
-rw-r--r-- | widgets/table/e-tree.c | 18 |
4 files changed, 9 insertions, 23 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 3d18bc38c4..05cf99e653 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -525,7 +525,7 @@ generate_layout (ECellTextView *text_view, int model_col, int view_col, int row, if (row >= 0) { char *temp = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row); - layout = build_layout (text_view, row, temp, width); + layout = build_layout (text_view, row, temp ? temp : "?", width); e_cell_text_free_text(ect, temp); } else layout = build_layout (text_view, row, "Mumbo Jumbo", width); 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); } } diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index 13635f4aa9..61b1c9dd0d 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -1027,7 +1027,7 @@ e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ETreePath path, node_t *node; int row; - if (!expanded && e_tree_model_node_is_root (etta->priv->source, path) && !etta->priv->root_visible) + if (!expanded && (!gnode || (e_tree_model_node_is_root (etta->priv->source, path) && !etta->priv->root_visible))) return; if (!gnode && expanded) { diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 5e2fcef6e9..5f06f65eb0 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -1345,18 +1345,6 @@ et_table_cell_changed (ETableModel *table_model, int view_col, int row, ETree *e } static void -et_table_rows_inserted (ETableModel *table_model, int row, int count, ETree *et) -{ - et_table_model_changed (table_model, et); -} - -static void -et_table_rows_deleted (ETableModel *table_model, int row, int count, ETree *et) -{ - et_table_model_changed (table_model, et); -} - -static void et_connect_to_etta (ETree *et) { et->priv->table_model_change_id = g_signal_connect (et->priv->etta, "model_changed", @@ -1368,12 +1356,6 @@ et_connect_to_etta (ETree *et) et->priv->table_cell_change_id = g_signal_connect (et->priv->etta, "model_cell_changed", G_CALLBACK (et_table_cell_changed), et); - et->priv->table_rows_inserted_id = g_signal_connect (et->priv->etta, "model_rows_inserted", - G_CALLBACK (et_table_rows_inserted), et); - - et->priv->table_rows_deleted_id = g_signal_connect (et->priv->etta, "model_rows_deleted", - G_CALLBACK (et_table_rows_deleted), et); - } static ETree * |