diff options
author | Jason Leach <jasonleach@usa.net> | 2001-04-29 09:14:50 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-04-29 09:14:50 +0800 |
commit | 2d3c06b3a4157382686a992800c60473bcc61c49 (patch) | |
tree | 8a152108d5d609e9bd399d1de077f60fc9a48932 /widgets/table/e-table-specification.c | |
parent | 30cc6ee6daceb7089ebab1f833e32287f253bb2a (diff) | |
download | gsoc2013-evolution-2d3c06b3a4157382686a992800c60473bcc61c49.tar.gz gsoc2013-evolution-2d3c06b3a4157382686a992800c60473bcc61c49.tar.zst gsoc2013-evolution-2d3c06b3a4157382686a992800c60473bcc61c49.zip |
(Make the alternating row colors a option in ETableSpecification instead
2001-04-28 Jason Leach <jasonleach@usa.net>
(Make the alternating row colors a option in ETableSpecification
instead of a compiled in #define)
* e-table-specification.c (e_table_specification_load_from_node):
Read in the "alternating-row-colors=bool" option for
ETableSpecifications. Default value is true so unless it is
specified to be false, row colors will alternate.
(e_table_specification_save_to_node): Save the alternating row
color options here.
* e-table.c (et_build_groups): Pass down the alternating row
colors through to the ETableGroup.
* e-table-group-container.[ch]: Handle the new alternating row
colors
option here, passing it to ETableItem.
* e-table-group-leaf.[ch]: Here too.
* e-table-item.c (eti_get_cell_background_color): Got rid of the
#define ALTERNATE_COLORS, replaced with truth check for
ETableItem::alternating_row_colors.
* e-tree.c: Make ETree recognize alternating row color options as
well.
svn path=/trunk/; revision=9622
Diffstat (limited to 'widgets/table/e-table-specification.c')
-rw-r--r-- | widgets/table/e-table-specification.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c index e4a7df56c9..b5acc017e3 100644 --- a/widgets/table/e-table-specification.c +++ b/widgets/table/e-table-specification.c @@ -61,12 +61,13 @@ etsp_init (ETableSpecification *etsp) etsp->columns = NULL; etsp->state = NULL; - etsp->no_headers = FALSE; - etsp->click_to_add = FALSE; - etsp->horizontal_draw_grid = FALSE; - etsp->vertical_draw_grid = FALSE; - etsp->draw_focus = TRUE; - etsp->horizontal_scrolling = FALSE; + etsp->alternating_row_colors = TRUE; + etsp->no_headers = FALSE; + etsp->click_to_add = FALSE; + etsp->horizontal_draw_grid = FALSE; + etsp->vertical_draw_grid = FALSE; + etsp->draw_focus = TRUE; + etsp->horizontal_scrolling = FALSE; etsp->cursor_mode = E_CURSOR_SIMPLE; etsp->selection_mode = GTK_SELECTION_MULTIPLE; @@ -163,6 +164,7 @@ e_table_specification_load_from_node (ETableSpecification *specification, specification->no_headers = e_xml_get_bool_prop_by_name (node, "no-headers"); specification->click_to_add = e_xml_get_bool_prop_by_name (node, "click-to-add"); + specification->alternating_row_colors = e_xml_get_bool_prop_by_name_with_default (node, "alternating-row-colors", TRUE); specification->horizontal_draw_grid = e_xml_get_bool_prop_by_name (node, "horizontal-draw-grid"); specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, "vertical-draw-grid"); if (e_xml_get_bool_prop_by_name_with_default(node, "draw-grid", TRUE) == @@ -308,6 +310,7 @@ e_table_specification_save_to_node (ETableSpecification *specification, node = xmlNewNode (NULL, "ETableSpecification"); e_xml_set_bool_prop_by_name (node, "no-headers", specification->no_headers); e_xml_set_bool_prop_by_name (node, "click-to-add", specification->click_to_add); + e_xml_set_bool_prop_by_name (node, "alternating-row-colors", specification->alternating_row_colors); e_xml_set_bool_prop_by_name (node, "horizontal-draw-grid", specification->horizontal_draw_grid); e_xml_set_bool_prop_by_name (node, "vertical-draw-grid", specification->vertical_draw_grid); e_xml_set_bool_prop_by_name (node, "draw-focus", specification->draw_focus); |