diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-03-21 00:22:30 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-03-21 00:22:30 +0800 |
commit | 451c410dec4efdef1562417066fd7b7464b14004 (patch) | |
tree | 8cc5fb50f634a2b806cc8c39c5104237af023283 /widgets | |
parent | 726712806ea9f61f69d8c4e42ac2dedf1d7afdf2 (diff) | |
download | gsoc2013-evolution-451c410dec4efdef1562417066fd7b7464b14004.tar.gz gsoc2013-evolution-451c410dec4efdef1562417066fd7b7464b14004.tar.zst gsoc2013-evolution-451c410dec4efdef1562417066fd7b7464b14004.zip |
Bumped the version number to 05.99.9.
2001-03-20 Christopher James Lahey <clahey@ximian.com>
* configure.in: Bumped the version number to 05.99.9.
From gal/e-table/ChangeLog:
2001-03-20 Christopher James Lahey <clahey@ximian.com>
* e-table-click-to-add.c: Turn on the vertical grid.
* e-table-group-container.c, e-table-group-container.h,
e-table-group-leaf.c, e-table-group-leaf.h, e-table-item.c,
e-table-item.h: Replaced the "drawgrid" argument with
"horizontal_draw_grid" and "vertical_draw_grid" arguments.
* e-table-specification.c, e-table-specifcation: Replaced the
draw_grid setting with the horizontal_draw_grid and
vertical_draw_grid settings. If the draw-grid property is set in
a ETableSpecification it is still obeyed and overrides the
vertical-draw-grid and horizontal-draw-grid properties.
* e-table.c, e-table.h, e-tree.c, e-tree.h: Deal with the
horizontal_draw_grid and vertical_draw_grid changes.
* e-tree-model.h: Added a missing include.
svn path=/trunk/; revision=8846
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/table/e-table-click-to-add.c | 6 | ||||
-rw-r--r-- | widgets/table/e-table-group-container.c | 31 | ||||
-rw-r--r-- | widgets/table/e-table-group-container.h | 3 | ||||
-rw-r--r-- | widgets/table/e-table-group-leaf.c | 30 | ||||
-rw-r--r-- | widgets/table/e-table-group-leaf.h | 3 | ||||
-rw-r--r-- | widgets/table/e-table-item.c | 37 | ||||
-rw-r--r-- | widgets/table/e-table-item.h | 3 | ||||
-rw-r--r-- | widgets/table/e-table-specification.c | 14 | ||||
-rw-r--r-- | widgets/table/e-table-specification.h | 3 | ||||
-rw-r--r-- | widgets/table/e-table.c | 9 | ||||
-rw-r--r-- | widgets/table/e-table.h | 3 | ||||
-rw-r--r-- | widgets/table/e-tree-model.h | 1 | ||||
-rw-r--r-- | widgets/table/e-tree.c | 11 | ||||
-rw-r--r-- | widgets/table/e-tree.h | 3 |
14 files changed, 109 insertions, 48 deletions
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c index cdaa446f90..3ca7729feb 100644 --- a/widgets/table/e-table-click-to-add.c +++ b/widgets/table/e-table-click-to-add.c @@ -301,7 +301,8 @@ finish_editing (ETableClickToAdd *etcta) "ETableHeader", etcta->eth, "ETableModel", etcta->one, "minimum_width", etcta->width, - "drawgrid", TRUE, + "horizontal_draw_grid", FALSE, + "vertical_draw_grid", TRUE, "table_selection_model", etcta->selection, "cursor_mode", E_CURSOR_SPREADSHEET, NULL); @@ -346,7 +347,8 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e) "ETableHeader", etcta->eth, "ETableModel", etcta->one, "minimum_width", etcta->width, - "drawgrid", TRUE, + "horizontal_draw_grid", FALSE, + "vertical_draw_grid", TRUE, "table_selection_model", etcta->selection, "cursor_mode", E_CURSOR_SPREADSHEET, NULL); diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index 42d8fa0f49..5ab6cdc754 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -34,7 +34,8 @@ enum { ARG_WIDTH, ARG_MINIMUM_WIDTH, ARG_FROZEN, - ARG_TABLE_DRAW_GRID, + ARG_TABLE_HORIZONTAL_DRAW_GRID, + ARG_TABLE_VERTICAL_DRAW_GRID, ARG_TABLE_DRAW_FOCUS, ARG_CURSOR_MODE, ARG_TABLE_SELECTION_MODEL, @@ -410,7 +411,8 @@ create_child_node (ETableGroupContainer *etgc, void *val) child = e_table_group_new (GNOME_CANVAS_GROUP (etgc), etg->full_header, etg->header, etg->model, etgc->sort_info, etgc->n + 1); gnome_canvas_item_set(GNOME_CANVAS_ITEM(child), - "drawgrid", etgc->draw_grid, + "horizontal_draw_grid", etgc->horizontal_draw_grid, + "vertical_draw_grid", etgc->vertical_draw_grid, "drawfocus", etgc->draw_focus, "cursor_mode", etgc->cursor_mode, "table_selection_model", etgc->table_selection_model, @@ -718,12 +720,22 @@ etgc_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) } break; - case ARG_TABLE_DRAW_GRID: - etgc->draw_grid = GTK_VALUE_BOOL (*arg); + case ARG_TABLE_HORIZONTAL_DRAW_GRID: + etgc->horizontal_draw_grid = GTK_VALUE_BOOL (*arg); for (list = etgc->children; list; list = g_list_next (list)) { ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; gtk_object_set (GTK_OBJECT(child_node->child), - "drawgrid", GTK_VALUE_BOOL (*arg), + "horizontal_draw_grid", GTK_VALUE_BOOL (*arg), + NULL); + } + break; + + case ARG_TABLE_VERTICAL_DRAW_GRID: + etgc->vertical_draw_grid = GTK_VALUE_BOOL (*arg); + for (list = etgc->children; list; list = g_list_next (list)) { + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + gtk_object_set (GTK_OBJECT(child_node->child), + "vertical_draw_grid", GTK_VALUE_BOOL (*arg), NULL); } break; @@ -805,8 +817,10 @@ etgc_class_init (GtkObjectClass *object_class) e_group_class->get_printable = etgc_get_printable; e_group_class->compute_location = etgc_compute_location; - gtk_object_add_arg_type ("ETableGroupContainer::drawgrid", GTK_TYPE_BOOL, - GTK_ARG_WRITABLE, ARG_TABLE_DRAW_GRID); + gtk_object_add_arg_type ("ETableGroupContainer::horizontal_draw_grid", GTK_TYPE_BOOL, + GTK_ARG_WRITABLE, ARG_TABLE_HORIZONTAL_DRAW_GRID); + gtk_object_add_arg_type ("ETableGroupContainer::vertical_draw_grid", GTK_TYPE_BOOL, + GTK_ARG_WRITABLE, ARG_TABLE_VERTICAL_DRAW_GRID); gtk_object_add_arg_type ("ETableGroupContainer::drawfocus", GTK_TYPE_BOOL, GTK_ARG_WRITABLE, ARG_TABLE_DRAW_FOCUS); gtk_object_add_arg_type ("ETableGroupContainer::cursor_mode", GTK_TYPE_INT, @@ -915,7 +929,8 @@ etgc_init (GtkObject *object) e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM(object), etgc_reflow); - container->draw_grid = 1; + container->horizontal_draw_grid = 1; + container->vertical_draw_grid = 1; container->draw_focus = 1; container->cursor_mode = E_CURSOR_SIMPLE; container->length_threshold = -1; diff --git a/widgets/table/e-table-group-container.h b/widgets/table/e-table-group-container.h index 27ed807ffc..e4c659993e 100644 --- a/widgets/table/e-table-group-container.h +++ b/widgets/table/e-table-group-container.h @@ -45,7 +45,8 @@ typedef struct { ETableSelectionModel *table_selection_model; - guint draw_grid : 1; + guint horizontal_draw_grid : 1; + guint vertical_draw_grid : 1; guint draw_focus : 1; ECursorMode cursor_mode; diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c index 35e7ef4f45..314d80e3de 100644 --- a/widgets/table/e-table-group-leaf.c +++ b/widgets/table/e-table-group-leaf.c @@ -29,7 +29,8 @@ enum { ARG_WIDTH, ARG_MINIMUM_WIDTH, ARG_FROZEN, - ARG_TABLE_DRAW_GRID, + ARG_TABLE_HORIZONTAL_DRAW_GRID, + ARG_TABLE_VERTICAL_DRAW_GRID, ARG_TABLE_DRAW_FOCUS, ARG_CURSOR_MODE, ARG_LENGTH_THRESHOLD, @@ -175,7 +176,8 @@ etgl_realize (GnomeCanvasItem *item) e_table_item_get_type (), "ETableHeader", E_TABLE_GROUP(etgl)->header, "ETableModel", etgl->ets, - "drawgrid", etgl->draw_grid, + "horizontal_draw_grid", etgl->horizontal_draw_grid, + "vertical_draw_grid", etgl->vertical_draw_grid, "drawfocus", etgl->draw_focus, "cursor_mode", etgl->cursor_mode, "minimum_width", etgl->minimum_width, @@ -335,11 +337,20 @@ etgl_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) NULL); } - case ARG_TABLE_DRAW_GRID: - etgl->draw_grid = GTK_VALUE_BOOL (*arg); + case ARG_TABLE_HORIZONTAL_DRAW_GRID: + etgl->horizontal_draw_grid = GTK_VALUE_BOOL (*arg); if (etgl->item) { gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item), - "drawgrid", GTK_VALUE_BOOL (*arg), + "horizontal_draw_grid", GTK_VALUE_BOOL (*arg), + NULL); + } + break; + + case ARG_TABLE_VERTICAL_DRAW_GRID: + etgl->vertical_draw_grid = GTK_VALUE_BOOL (*arg); + if (etgl->item) { + gnome_canvas_item_set (GNOME_CANVAS_ITEM(etgl->item), + "vertical_draw_grid", GTK_VALUE_BOOL (*arg), NULL); } break; @@ -417,8 +428,10 @@ etgl_class_init (GtkObjectClass *object_class) e_group_class->get_printable = etgl_get_printable; e_group_class->compute_location = etgl_compute_location; - gtk_object_add_arg_type ("ETableGroupLeaf::drawgrid", GTK_TYPE_BOOL, - GTK_ARG_WRITABLE, ARG_TABLE_DRAW_GRID); + gtk_object_add_arg_type ("ETableGroupLeaf::horizontal_draw_grid", GTK_TYPE_BOOL, + GTK_ARG_WRITABLE, ARG_TABLE_HORIZONTAL_DRAW_GRID); + gtk_object_add_arg_type ("ETableGroupLeaf::vertical_draw_grid", GTK_TYPE_BOOL, + GTK_ARG_WRITABLE, ARG_TABLE_VERTICAL_DRAW_GRID); gtk_object_add_arg_type ("ETableGroupLeaf::drawfocus", GTK_TYPE_BOOL, GTK_ARG_WRITABLE, ARG_TABLE_DRAW_FOCUS); gtk_object_add_arg_type ("ETableGroupLeaf::cursor_mode", GTK_TYPE_INT, @@ -450,7 +463,8 @@ etgl_init (GtkObject *object) etgl->ets = NULL; etgl->item = NULL; - etgl->draw_grid = 1; + etgl->horizontal_draw_grid = 1; + etgl->vertical_draw_grid = 1; etgl->draw_focus = 1; etgl->cursor_mode = E_CURSOR_SIMPLE; etgl->length_threshold = -1; diff --git a/widgets/table/e-table-group-leaf.h b/widgets/table/e-table-group-leaf.h index 680ee37347..27407148b9 100644 --- a/widgets/table/e-table-group-leaf.h +++ b/widgets/table/e-table-group-leaf.h @@ -32,7 +32,8 @@ typedef struct { ETableSubset *ets; guint is_grouped : 1; - guint draw_grid : 1; + guint horizontal_draw_grid : 1; + guint vertical_draw_grid : 1; guint draw_focus : 1; ECursorMode cursor_mode; diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 1395e9cb24..c675da9e8b 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -47,7 +47,8 @@ enum { ARG_TABLE_HEADER, ARG_TABLE_MODEL, ARG_TABLE_SELECTION_MODEL, - ARG_TABLE_DRAW_GRID, + ARG_TABLE_HORIZONTAL_DRAW_GRID, + ARG_TABLE_VERTICAL_DRAW_GRID, ARG_TABLE_DRAW_FOCUS, ARG_CURSOR_MODE, ARG_LENGTH_THRESHOLD, @@ -520,7 +521,7 @@ eti_get_height (ETableItem *eti) const int rows = eti->rows; int row; int height; - int height_extra = eti->draw_grid ? 1 : 0; + int height_extra = eti->horizontal_draw_grid ? 1 : 0; if (rows == 0) return 0; @@ -616,7 +617,7 @@ int e_table_item_row_diff (ETableItem *eti, int start_row, int end_row) { int row, total; - int height_extra = eti->draw_grid ? 1 : 0; + int height_extra = eti->horizontal_draw_grid ? 1 : 0; total = 0; @@ -983,8 +984,12 @@ eti_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) eti->length_threshold = GTK_VALUE_INT (*arg); break; - case ARG_TABLE_DRAW_GRID: - eti->draw_grid = GTK_VALUE_BOOL (*arg); + case ARG_TABLE_HORIZONTAL_DRAW_GRID: + eti->horizontal_draw_grid = GTK_VALUE_BOOL (*arg); + break; + + case ARG_TABLE_VERTICAL_DRAW_GRID: + eti->vertical_draw_grid = GTK_VALUE_BOOL (*arg); break; case ARG_TABLE_DRAW_FOCUS: @@ -1209,7 +1214,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, ArtPoint eti_base, eti_base_item, lower_right; GtkWidget *canvas = GTK_WIDGET(item->canvas); GdkColor *background; - int height_extra = eti->draw_grid ? 1 : 0; + int height_extra = eti->horizontal_draw_grid ? 1 : 0; /* * Clear the background @@ -1293,7 +1298,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, f_x1 = f_x2 = f_y1 = f_y2 = -1; f_found = FALSE; - if (eti->draw_grid && first_row == 0){ + if (eti->horizontal_draw_grid && first_row == 0){ gdk_draw_line ( drawable, eti->grid_gc, eti_base.x - x, yd, eti_base.x + eti->width - x, yd); @@ -1402,7 +1407,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, } yd += height; - if (eti->draw_grid) { + if (eti->horizontal_draw_grid) { gdk_draw_line ( drawable, eti->grid_gc, eti_base.x - x, yd, eti_base.x + eti->width - x, yd); @@ -1411,7 +1416,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, } } - if (eti->draw_grid){ + if (eti->vertical_draw_grid){ int xd = x_offset; for (col = first_col; col <= last_col; col++){ @@ -1456,7 +1461,7 @@ find_cell (ETableItem *eti, double x, double y, int *col_res, int *row_res, doub gdouble x1, y1, x2, y2; int col, row; - int height_extra = eti->draw_grid ? 1 : 0; + int height_extra = eti->horizontal_draw_grid ? 1 : 0; /* FIXME: this routine is inneficient, fix later */ @@ -2071,8 +2076,10 @@ eti_class_init (GtkObjectClass *object_class) GTK_ARG_WRITABLE, ARG_TABLE_MODEL); gtk_object_add_arg_type ("ETableItem::table_selection_model", E_TABLE_SELECTION_MODEL_TYPE, GTK_ARG_WRITABLE, ARG_TABLE_SELECTION_MODEL); - gtk_object_add_arg_type ("ETableItem::drawgrid", GTK_TYPE_BOOL, - GTK_ARG_WRITABLE, ARG_TABLE_DRAW_GRID); + gtk_object_add_arg_type ("ETableItem::horizontal_draw_grid", GTK_TYPE_BOOL, + GTK_ARG_WRITABLE, ARG_TABLE_HORIZONTAL_DRAW_GRID); + gtk_object_add_arg_type ("ETableItem::vertical_draw_grid", GTK_TYPE_BOOL, + GTK_ARG_WRITABLE, ARG_TABLE_VERTICAL_DRAW_GRID); gtk_object_add_arg_type ("ETableItem::drawfocus", GTK_TYPE_BOOL, GTK_ARG_WRITABLE, ARG_TABLE_DRAW_FOCUS); gtk_object_add_arg_type ("ETableItem::cursor_mode", GTK_TYPE_INT, @@ -2442,7 +2449,7 @@ e_table_item_print_page (EPrintable *ep, /* * Draw cells */ - if (eti->draw_grid){ + if (eti->horizontal_draw_grid){ gp_draw_rect(context, 0, yd, width, 1); } yd--; @@ -2492,7 +2499,7 @@ e_table_item_print_page (EPrintable *ep, } yd -= row_height; - if (eti->draw_grid){ + if (eti->horizontal_draw_grid){ gp_draw_rect(context, 0, yd, width, 1); } yd--; @@ -2500,7 +2507,7 @@ e_table_item_print_page (EPrintable *ep, itemcontext->rows_printed = row; - if (eti->draw_grid){ + if (eti->vertical_draw_grid){ gdouble xd = 0; for (col = 0; col < cols; col++){ diff --git a/widgets/table/e-table-item.h b/widgets/table/e-table-item.h index 73d7032b1f..5e9ea2eb99 100644 --- a/widgets/table/e-table-item.h +++ b/widgets/table/e-table-item.h @@ -53,7 +53,8 @@ typedef struct { GdkGC *focus_gc; GdkBitmap *stipple; - guint draw_grid:1; + guint horizontal_draw_grid:1; + guint vertical_draw_grid:1; guint draw_focus:1; guint renderers_can_change_size:1; guint cell_views_realized:1; diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c index cfeda97b68..10866abc08 100644 --- a/widgets/table/e-table-specification.c +++ b/widgets/table/e-table-specification.c @@ -61,7 +61,8 @@ etsp_init (ETableSpecification *etsp) etsp->no_headers = FALSE; etsp->click_to_add = FALSE; - etsp->draw_grid = FALSE; + etsp->horizontal_draw_grid = FALSE; + etsp->vertical_draw_grid = FALSE; etsp->draw_focus = TRUE; etsp->horizontal_scrolling = FALSE; @@ -160,7 +161,13 @@ 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->draw_grid = e_xml_get_bool_prop_by_name (node, "draw-grid"); + 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) == + e_xml_get_bool_prop_by_name_with_default(node, "draw-grid", FALSE)) { + specification->horizontal_draw_grid = + specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, "draw-grid"); + } specification->draw_focus = e_xml_get_bool_prop_by_name_with_default (node, "draw-focus", TRUE); specification->horizontal_scrolling = e_xml_get_bool_prop_by_name_with_default (node, "horizontal-scrolling", FALSE); @@ -299,7 +306,8 @@ 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, "draw-grid", specification->draw_grid); + 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); e_xml_set_bool_prop_by_name (node, "horizontal-scrolling", specification->horizontal_scrolling); diff --git a/widgets/table/e-table-specification.h b/widgets/table/e-table-specification.h index c6cbb27dcf..ebf42a6f8d 100644 --- a/widgets/table/e-table-specification.h +++ b/widgets/table/e-table-specification.h @@ -27,7 +27,8 @@ typedef struct { guint no_headers : 1; guint click_to_add : 1; - guint draw_grid : 1; + guint horizontal_draw_grid : 1; + guint vertical_draw_grid : 1; guint draw_focus : 1; guint horizontal_scrolling : 1; GtkSelectionMode selection_mode; diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 8ed176a4da..716b81fd75 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -202,7 +202,8 @@ e_table_init (GtkObject *object) e_table->group_info_change_id = 0; e_table->reflow_idle_id = 0; - e_table->draw_grid = 1; + e_table->horizontal_draw_grid = 1; + e_table->vertical_draw_grid = 1; e_table->draw_focus = 1; e_table->cursor_mode = E_CURSOR_SIMPLE; e_table->length_threshold = 200; @@ -561,7 +562,8 @@ et_build_groups (ETable *et) 0); e_canvas_vbox_add_item(E_CANVAS_VBOX(et->canvas_vbox), GNOME_CANVAS_ITEM(et->group)); gnome_canvas_item_set(GNOME_CANVAS_ITEM(et->group), - "drawgrid", et->draw_grid, + "horiztonal_draw_grid", et->horizontal_draw_grid, + "vertical_draw_grid", et->vertical_draw_grid, "drawfocus", et->draw_focus, "cursor_mode", et->cursor_mode, "length_threshold", et->length_threshold, @@ -938,7 +940,8 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, e_table->use_click_to_add = specification->click_to_add; e_table->click_to_add_message = g_strdup (gettext (specification->click_to_add_message)); - e_table->draw_grid = specification->draw_grid; + e_table->horizontal_draw_grid = specification->horizontal_draw_grid; + e_table->vertical_draw_grid = specification->vertical_draw_grid; e_table->draw_focus = specification->draw_focus; e_table->cursor_mode = specification->cursor_mode; e_table->full_header = e_table_spec_to_full_header(specification, ete); diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h index 17e52d5f07..307952fbef 100644 --- a/widgets/table/e-table.h +++ b/widgets/table/e-table.h @@ -73,7 +73,8 @@ typedef struct { /* * Configuration settings */ - guint draw_grid : 1; + guint horizontal_draw_grid : 1; + guint vertical_draw_grid : 1; guint draw_focus : 1; guint row_selection_active : 1; diff --git a/widgets/table/e-tree-model.h b/widgets/table/e-tree-model.h index 21d3b9b844..965d66e915 100644 --- a/widgets/table/e-tree-model.h +++ b/widgets/table/e-tree-model.h @@ -3,6 +3,7 @@ #define _E_TREE_MODEL_H_ #include <gdk-pixbuf/gdk-pixbuf.h> +#include <gtk/gtkobject.h> #ifdef __cplusplus extern "C" { diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index a434d54ea8..5f34e89fee 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -154,7 +154,8 @@ e_tree_init (GtkObject *object) e_tree->sort_info = NULL; e_tree->reflow_idle_id = 0; - e_tree->draw_grid = 1; + e_tree->horizontal_draw_grid = 1; + e_tree->vertical_draw_grid = 1; e_tree->draw_focus = 1; e_tree->cursor_mode = E_CURSOR_SIMPLE; e_tree->length_threshold = 200; @@ -439,7 +440,8 @@ et_build_item (ETree *et) "ETableHeader", et->header, "ETableModel", et->etta, "table_selection_model", et->selection, - "drawgrid", et->draw_grid, + "horizontal_draw_grid", et->horizontal_draw_grid, + "vertical_draw_grid", et->vertical_draw_grid, "drawfocus", et->draw_focus, "cursor_mode", et->cursor_mode, "length_threshold", et->length_threshold, @@ -714,7 +716,8 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete, else ete = e_table_extras_new(); - e_tree->draw_grid = specification->draw_grid; + e_tree->horizontal_draw_grid = specification->horizontal_draw_grid; + e_tree->vertical_draw_grid = specification->vertical_draw_grid; e_tree->draw_focus = specification->draw_focus; e_tree->cursor_mode = specification->cursor_mode; e_tree->full_header = e_table_spec_to_full_header(specification, ete); @@ -1113,6 +1116,8 @@ e_tree_node_is_expanded (ETree *et, ETreePath path) { path = e_tree_sorted_model_to_view_path(et->sorted, path); + g_return_val_if_fail(path, FALSE); + return e_tree_table_adapter_node_is_expanded (et->etta, path); } diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h index 9726fdd996..6b8f71789c 100644 --- a/widgets/table/e-tree.h +++ b/widgets/table/e-tree.h @@ -58,7 +58,8 @@ typedef struct { /* * Configuration settings */ - guint draw_grid : 1; + guint horizontal_draw_grid : 1; + guint vertical_draw_grid : 1; guint draw_focus : 1; guint row_selection_active : 1; |