diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2001-01-11 02:15:13 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-01-11 02:15:13 +0800 |
commit | a1ca83afd9f3fa742d9f2c07b990b576d3867668 (patch) | |
tree | b1eedc6f181835247d45a991072458711737bafc /widgets/table/e-table.c | |
parent | 54c085cc3cec41cc3d5a77efadb98450a7c5b4b6 (diff) | |
download | gsoc2013-evolution-a1ca83afd9f3fa742d9f2c07b990b576d3867668.tar gsoc2013-evolution-a1ca83afd9f3fa742d9f2c07b990b576d3867668.tar.gz gsoc2013-evolution-a1ca83afd9f3fa742d9f2c07b990b576d3867668.tar.bz2 gsoc2013-evolution-a1ca83afd9f3fa742d9f2c07b990b576d3867668.tar.lz gsoc2013-evolution-a1ca83afd9f3fa742d9f2c07b990b576d3867668.tar.xz gsoc2013-evolution-a1ca83afd9f3fa742d9f2c07b990b576d3867668.tar.zst gsoc2013-evolution-a1ca83afd9f3fa742d9f2c07b990b576d3867668.zip |
Added expansions field and loading and saving of that field.
2001-01-10 Christopher James Lahey <clahey@helixcode.com>
* e-table-state.c, e-table-state.h: Added expansions field and
loading and saving of that field.
* e-table.c: Load and save expansion data.
svn path=/trunk/; revision=7366
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r-- | widgets/table/e-table.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 5c7697c10a..4311005107 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -715,13 +715,21 @@ et_state_to_header (ETable *e_table, ETableHeader *full_header, ETableState *sta for (column = 0; column < state->col_count; column++) { int col; + double expansion; + ETableCol *table_col; col = state->columns[column]; + expansion = state->expansions[column]; if (col >= max_cols) continue; - e_table_header_add_column (nh, e_table_header_get_column (full_header, col), -1); + table_col = e_table_header_get_column (full_header, col); + + if (expansion >= -1) + table_col->expansion = expansion; + + e_table_header_add_column (nh, table_col, -1); } return nh; @@ -822,15 +830,17 @@ e_table_get_state_object (ETable *e_table) state->col_count = e_table_header_count (e_table->header); full_col_count = e_table_header_count (e_table->full_header); state->columns = g_new(int, state->col_count); + state->expansions = g_new(double, state->col_count); for (i = 0; i < state->col_count; i++) { - int col_idx = e_table_header_index(e_table->header, i); + ETableCol *col = e_table_header_get_column(e_table->header, i); state->columns[i] = -1; for (j = 0; j < full_col_count; j++) { - if (col_idx == e_table_header_index(e_table->full_header, j)) { + if (col->col_idx == e_table_header_index(e_table->full_header, j)) { state->columns[i] = j; break; } } + state->expansions[i] = col->expansion; } return state; |