aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-item.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-03-21 00:22:30 +0800
committerChris Lahey <clahey@src.gnome.org>2001-03-21 00:22:30 +0800
commit451c410dec4efdef1562417066fd7b7464b14004 (patch)
tree8cc5fb50f634a2b806cc8c39c5104237af023283 /widgets/table/e-table-item.c
parent726712806ea9f61f69d8c4e42ac2dedf1d7afdf2 (diff)
downloadgsoc2013-evolution-451c410dec4efdef1562417066fd7b7464b14004.tar
gsoc2013-evolution-451c410dec4efdef1562417066fd7b7464b14004.tar.gz
gsoc2013-evolution-451c410dec4efdef1562417066fd7b7464b14004.tar.bz2
gsoc2013-evolution-451c410dec4efdef1562417066fd7b7464b14004.tar.lz
gsoc2013-evolution-451c410dec4efdef1562417066fd7b7464b14004.tar.xz
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/table/e-table-item.c')
-rw-r--r--widgets/table/e-table-item.c37
1 files changed, 22 insertions, 15 deletions
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++){