Commit 40a50bdd authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa

I am now using a gc for the empty cells (as the default gc is used and

1999-09-22  Miguel de Icaza  <miguel@gnu.org>

	* src/item-grid.c (item_grid_paint_empty_cell): I am now using a
	gc for the empty cells (as the default gc is used and abused by
	the cell-draw code, better to keep our own).

	TODO: queue an update on the regions with changed style.  Wonder
	why this is not being done automatically.  Need to check.
parent 9a1127a7
1999-09-22 Miguel de Icaza <miguel@gnu.org>
* src/item-grid.c (item_grid_paint_empty_cell): I am now using a
gc for the empty cells (as the default gc is used and abused by
the cell-draw code, better to keep our own).
TODO: queue an update on the regions with changed style. Wonder
why this is not being done automatically. Need to check.
* src/widgets/widget-color-combo.c (color_combo_construct): Fix
visuals for working with Imlib properly.
......
1999-09-22 Miguel de Icaza <miguel@gnu.org>
* src/item-grid.c (item_grid_paint_empty_cell): I am now using a
gc for the empty cells (as the default gc is used and abused by
the cell-draw code, better to keep our own).
TODO: queue an update on the regions with changed style. Wonder
why this is not being done automatically. Need to check.
* src/widgets/widget-color-combo.c (color_combo_construct): Fix
visuals for working with Imlib properly.
......
......@@ -231,7 +231,7 @@ msgstr "Jody Goldberg, hacker de Excel."
#: src/about.c:28
msgid "Ross Ihaka, special functions."
msgstr ""
msgstr "Ross Ihaka, funciones espciales."
#: src/about.c:29
msgid "Jukka-Pekka Iivonen, numerous functions and tools."
......@@ -316,7 +316,7 @@ msgstr "Referencia circular"
#: src/corba-args.c:33
msgid "Could not initialize the Gnumeric Workbook factory"
msgstr ""
msgstr "No pude inicializar la fbrica de libros de trabajo de Gnumeric"
#: src/dates.c:14
msgid "*Sun"
......@@ -493,7 +493,7 @@ msgstr "Res
#: src/dialogs/dialog-analysis-tools.c:152
msgid "Confidence Level for Mean"
msgstr ""
msgstr "Nivel de confidencia para el promedio"
#: src/dialogs/dialog-analysis-tools.c:153
msgid "0.95"
......@@ -522,7 +522,7 @@ msgstr "Etiquetas"
#: src/dialogs/dialog-analysis-tools.c:174
msgid "Standard Errors"
msgstr ""
msgstr "Errores estndar"
#: src/dialogs/dialog-analysis-tools.c:201
msgid "Columns"
......@@ -709,7 +709,7 @@ msgstr "Columna:"
#: src/dialogs/dialog-cell-sort.c:55
msgid "Asc"
msgstr ""
msgstr "Asc"
#: src/dialogs/dialog-cell-sort.c:58
msgid "Desc"
......@@ -717,15 +717,15 @@ msgstr "Desc"
#: src/dialogs/dialog-cell-sort.c:271
msgid "more clauses than rows ?"
msgstr ""
msgstr "Ms clusulas que renglones?"
#: src/dialogs/dialog-cell-sort.c:274
msgid "too many clauses"
msgstr ""
msgstr "Demasiadas clusulas."
#: src/dialogs/dialog-cell-sort.c:294
msgid "Need at least one clause"
msgstr ""
msgstr "Necesito por lo menos una clusula"
#: src/dialogs/dialog-cell-sort.c:314 src/workbook.c:1508
msgid "Selection must be a single range"
......@@ -794,7 +794,7 @@ msgstr "Cadena"
#: src/dialogs/dialog-function-wizard.c:212
msgid "Boolean"
msgstr ""
msgstr "Valor de verdad (booleano)"
#: src/dialogs/dialog-function-wizard.c:215
msgid "Range"
......@@ -823,7 +823,7 @@ msgstr "Asistente de f
#: src/dialogs/dialog-goal-seek.c:191
#, c-format
msgid "Goal seeking with cell %s found a solution"
msgstr ""
msgstr "He encontrado la solucin usando la celda %s"
#: src/dialogs/dialog-goal-seek.c:195
#, c-format
......@@ -1015,7 +1015,7 @@ msgstr "Cuadr
#: src/dialogs/dialog-solver.c:57
msgid "Forward"
msgstr ""
msgstr "Adelante"
#: src/dialogs/dialog-solver.c:58
msgid "Central"
......@@ -1039,7 +1039,7 @@ msgstr "Asumir no-negativo"
#: src/dialogs/dialog-solver.c:75
msgid "Use Automatic Scaling"
msgstr ""
msgstr "Usar escalamiento automtico"
#: src/dialogs/dialog-solver.c:76
msgid "Show Iteration Results"
......@@ -1051,7 +1051,7 @@ msgstr "Opciones del resolvedor de Gnumeric"
#: src/dialogs/dialog-solver.c:246
msgid "Add Constraint"
msgstr ""
msgstr "Aadir lmite"
#: src/dialogs/dialog-solver.c:249 src/dialogs/names.glade.h:9
msgid "Add"
......@@ -1410,7 +1410,7 @@ msgstr "Imposible crear el archivo %s\n"
#: src/embeddable-grid.c:153
msgid "Embedded Sheet"
msgstr ""
msgstr "Hoja inmersa"
#: src/expr-name.c:131
msgid "already defined"
......@@ -2955,7 +2955,7 @@ msgstr ""
#: src/functions/fn-eng.c:1612
msgid "Engineering"
msgstr ""
msgstr "Ingeniera"
#: src/functions/fn-financial.c:206
msgid ""
......@@ -3692,7 +3692,7 @@ msgstr ""
#: src/functions/fn-logical.c:192
msgid "Logical"
msgstr ""
msgstr "Lgicas"
#: src/functions/fn-lookup.c:16
msgid ""
......@@ -3863,7 +3863,7 @@ msgstr ""
#: src/functions/fn-lookup.c:780
msgid "Data / Lookup"
msgstr ""
msgstr "Datos/Bsqueda"
#: src/functions/fn-math.c:156
msgid ""
......
......@@ -78,7 +78,8 @@ item_grid_realize (GnomeCanvasItem *item)
item_grid->grid_gc = gc = gdk_gc_new (window);
item_grid->fill_gc = gdk_gc_new (window);
item_grid->gc = gdk_gc_new (window);
item_grid->empty_gc = gdk_gc_new (window);
/* Allocate the default colors */
item_grid->background = gs_white;
item_grid->grid_color = gs_light_gray;
......@@ -130,9 +131,11 @@ item_grid_unrealize (GnomeCanvasItem *item)
gdk_gc_unref (item_grid->grid_gc);
gdk_gc_unref (item_grid->fill_gc);
gdk_gc_unref (item_grid->gc);
gdk_gc_unref (item_grid->empty_gc);
item_grid->grid_gc = 0;
item_grid->fill_gc = 0;
item_grid->gc = 0;
item_grid->empty_gc = 0;
for (i = 0; i < BORDER_MAX; i++)
gdk_gc_unref (item_grid->border_gc[i]);
......@@ -342,31 +345,12 @@ item_grid_paint_empty_cell (GdkDrawable *drawable, ItemGrid *item_grid,
if ((style->valid_flags & STYLE_BACK_COLOR) && (style->back_color)){
Sheet *sheet = item_grid->sheet_view->sheet;
if (style->back_color == sheet->default_style->back_color){
printf ("SAME, ");
fflush (stdout);
if (style->back_color == sheet->default_style->back_color)
return;
}
gdk_gc_set_foreground (item_grid->gc, &style->back_color->color);
printf ("Painting %d, %d\n", col, row);
item_debug_cross (drawable, item_grid->gc,
x + ci->margin_a, y + ri->margin_b,
x + ci->margin_a + ci->pixels - ci->margin_b,
y + ri->margin_b + ri->pixels - ri->margin_b);
return;
/*
* FIXME: If the style is the default sheet style, we can
* avoid drawing this
*/
gdk_gc_set_background (item_grid->gc, &style->back_color->color);
printf ("%d %d %d\n",
style->back_color->color.red,
style->back_color->color.green,
style->back_color->color.blue);
gdk_gc_set_foreground (item_grid->empty_gc, &style->back_color->color);
gdk_draw_rectangle (
drawable, item_grid->gc, TRUE,
drawable, item_grid->empty_gc, TRUE,
x + ci->margin_a, y + ri->margin_b,
ci->pixels - ci->margin_b,
ri->pixels - ri->margin_b);
......@@ -450,19 +434,17 @@ item_grid_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int
cell = sheet_cell_get (sheet, col, row);
if (cell){
if (cell_is_blank (cell)){
item_grid_paint_empty_cell (
drawable, item_grid, ci, ri,
col, row, x_paint, y_paint);
} else {
item_grid_draw_cell (
drawable, item_grid, cell,
x_paint, y_paint);
}
if (!cell && gnumeric_debugging > 0){
item_grid_paint_empty_cell (
drawable, item_grid, ci, ri,
col, row, x_paint, y_paint);
}
if (!cell && (ri->pos != -1)){
if (cell_is_blank (cell) && (ri->pos != -1)){
/*
* If there was no cell, and the row has any cell allocated
* (indicated by ri->pos != -1)
......
......@@ -34,6 +34,7 @@ typedef struct {
GdkGC *grid_gc; /* Draw grid gc */
GdkGC *fill_gc; /* Default background fill gc */
GdkGC *gc; /* Color used for the cell */
GdkGC *empty_gc; /* GC used for drawing empty cells */
GdkColor background;
GdkColor grid_color;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment